Should every company adapt to microservices? Everything else is a legacy!
How to become ready for microservices?
There are some trade offs coming with using microservices.
The most relevant characteristics of microservices
- Decentralized - they are distributed systems;
- independent - each company lent can be replaced without touching the others;
- bounded context;
- polyglot - no concept “One language fits all”;
- comes with principle “you build it, you run it”.
Agility & microservices
- small independent teams
- do one thing well
- shorten build/run cycle time
Challenges: - find right angle to break down the monolith (no cross dependencies); - all competences inside the team; - new metrics to understand if your system is healthy, collect logs, distributed tracing; - how to deploy and distribute.
So where can you start? Learn to walk, before you run! Start from few services only. Setup the CI/CD even with existing implementation, before breaking down to microservices. Start building tests: unit tests, check the test coverage.
- can scale microservices independently
- can choose optimal data storage and solution per service
Identify scalability bottle neck of the whole system: even if one service scales independently, it can have issues in the whole system. If scalability is a painful part, then redefine scalability for breaking down of your monolith. Know your limits with doing proper testing.
Quality and availability
Complexity is reduced with microservices, also smaller deployments can help with fast feedback. Failure isolation: one failed service will not bring the whole system down. Choose microservices not because your monolith is bad structured, but because of the benefits of microservices!