97
CHAPTER 5 | Designing and Developing Multi-Container and Microservice-Based .NET Applications
Data sovereignty per microservice
In
the sample application, each microservice owns its own database or data source, although all SQL
Server databases are deployed as a single container. This design decision was made only to make it
easy for a developer
to get the code from GitHub, clone it, and open it in Visual Studio or Visual
Studio Code. Or alternatively, it makes it easy to compile the custom Docker images using the .NET
CLI
and the Docker CLI, and then deploy and run them in a Docker development environment. Either
way, using containers for data sources lets developers build and deploy in a matter of minutes without
having to provision an external database or any other data source with
hard dependencies on
infrastructure (cloud or on-premises).
In a real production environment, for high availability and for scalability, the databases should be
based on database servers
in the cloud or on-premises, but not in containers.
Therefore, the units of deployment for microservices (and even for databases in this application) are
Docker containers, and the reference application is a multi-container application that embraces
microservices principles.
Dostları ilə paylaş: