What are microservices?
Microservices represent an application that is divided into multiple smaller applications. Each application, or microservice, interacts with the others to create a scalable system. Usually, but not necessarily, microservices are deployed to the cloud as containerized or serverless applications.
Before getting into too many details, these are the principles to keep in mind when building microservices:
- Each microservice should be a cohesive unit of business
- Each microservice should own its data
- Each microservice should be independent of the others
Furthermore, everything we have studied so far—the other principles of designing software—applies to microservices but on another scale. For example, you don’t want tight coupling between microservices (solved by microservices independence), but coupling is inevitable (as with any code). There are numerous ways to solve this problem, such as the Publish-Subscribe...