Pure Software Engineer :)
What is a Microservices Architecture? 본문
What is a Microservices Architecture?
Cockcroft defines a microservices architecture as a service-oriented architecture composed of loosely coupled elements that have bounded contexts
Loosely coupled means that you can update the services independently; updating one service doesn’t require changing any other services. If you have a bunch of small, specialized services but still have to update them together, they’re not microservices because they’re not loosely coupled.
The microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API.
Bounded Context
You can understand and update the microservice’s code without knowing anything about the internals of its peers, because the microservices and its peers interact strictly through APIs and so don’t share data structures, database schemata, or other internal representations of objects.
When working with a microservices architecture, you think of other internal development teams like those Internet backends: as external services that your microservice interacts with through APIs. The commonly understood “contract” between microservices is that their APIs are stable and forward compatible.
Best Practices for Designing a Microservices Architecture
1.Create a Separate Data Store for Each Microservice
2. Keep Code at a Similar Level of Maturity
3. Do a separate Build for Each microservice
4. Deploy in Containers
5. Treat Servers as Stateless
Characteristics of a Microservice Arthitecture
- Componentization via Services
- Organized around Business Capabilities
- Products not Projects
- Smart endpoints and dumb pipes
- Decentralized Governance
- Decentralized Data Management
- Infrastructure Automation
- Design for failure
- Any service call could fail due to unavailability of the supplier, the client has to respond to this as gracefully as possible.
- Evolutionary Design
References
https://www.nginx.com/blog/microservices-at-netflix-architectural-best-practices/
http://martinfowler.com/articles/microservices.html