Key points about microservices in Medium
Viktor Turskyi (WebbyLab)Great article about microservice architecture in Medium. This is the case when everything is done based on common sense. Initially, the medium had a monolith on NodeJS, but due to a number of limitations in 2018, they migrated to microservices.
Key points:
1. Do not do microservice for the sake of microservices. Use microservices only when it makes sense
2. Microservice is not about the SLOC. Microservices can be large, the main thing is that they solve one specific problem.
3. Each microservice has its own set of data (the article describes different ways to achieve that). Using one shared database is not a good idea.
4. RPC is more suitable than REST for communication between microservices. Medium uses gRPC.
5. You do not have to create a microservice from scratch. You can take a part of your monolith and make it into a separate service.
6. Poorly constructed microservices can be worse than a monolith. If you can’t build a working monolith, then what makes you think that you can build a microservice architecture :).
7. Microservice is not a reason to involve the maximum number of different technologies, as this can increase the cost of support and fragment the team.
8. For small teams, the monolith will be the best solution, just make it modular.
The article: https://medium.engineering/microservice-architecture-at-medium-9c33805eb74f