I have read many posts and watched video to understand Microservices precisely however I found Martin Fowler’s explanation about Microservices most helpful. This blog post is just the recap & summary of what I understood about Microservices Architecture.
Characteristics of Microservices
- Build services in form of Components
- Components can be independently replaceable and upgradable
- Components can be combination of Libraries and Services
- Services can be built in other languages and services can inter communicate
- Organized keeping business rules in mind
- Traditionally (Monolithic), Services were organized considering technical aspects like different services related to UI, Database, Server etc
- Microservices, suggests to group it as per business capabilities like shipping, Order, Catalog etc
- Smart end points and dump pipe
- In ESB (aka spaghetti box 😉 lol), we tend to add all smartness in ESB itself and endpoint is just a dump where consumer gets preprocessed data
- MicroServices on other hand encourages dump pipe (ESB) and smart endpoints
-
- Decentralized Governance or Data Governance
- Every Service should be responsible for their own database & persistence
- Can’t communicate to other databases directly, it should be via API’s only (These are mostly inspired by Amazon’s 2 Pizza team size)
- Every service can have different languages or tools
- Infrastructure Automation
- Continuous Delivery is very important for each services to make sure there is no or minimal down time
- Top class monitoring capabilities to perform analysis of degraded performance or downtime
- Important to have roll back plan and ability to spin up new server in case of service or service fail
- Design for failure
- As there could be many microservices, its inevitable that they would fail.
- Companies like Netflix, they have a application (chaos monkey) which randomly goes out and fail their microservices deliberately
- Its important to perform these kind of exercises to understand how resilient their network and microservices are.