Arpit's Newsletter read by 56000+ engineers
Weekly essays on real-world system design, distributed systems, or a deep dive into some super-clever algorithm.
We always hear great things about Microservices. But today let’s talk about the top 10 challenges that come with adopting Microservices.
As the number of microservices increases, managing them becomes tough. If there is no plan or accountability then we might end up with a lot of tiny microservices or with a huge macro-service.
Monitoring what happens across the entire infra is critical. Along with this, we would also need an ability to trace end user request path spanning services - also called Distributed Tracing.
It does not take much time for our services to grow beyond 100 and at that scale, discovering a service becomes a pain requiring us to put Service Discovery.
3 ways to do it are
Inter-service communication should be secure to ensure that a service does not abuse others; hence we need to put auth in place that allows authorized services to talk to each other.
Every microservice has a set of configs, like DB passwords, and API Keys. Committing them to the repository is an unacceptable practice, and we would not want every service to have its own config server.
Hence we need to have about a central config management system that is fault tolerant, robust, and scales well.
It is extremely difficult to move back to monolith after the teams have tasted microservices. A few reasons would be
Outages are inevitable and as engineers, we always try to minimize them. A way to achieve this is to keep services loosely coupled that keep outages isolated ensuring no cascading failures.
End-to-end testing becomes complex as it is hard to spin up environments with all services running fine.
Robust microservices require a counter-intuitive approach, and we need to assume everything would collapse after every line of code. Then we amend the code and architecture to handle it and re-iterate.
Managing dependencies across services is tough and it leads to a slowdown. The 3 kinds of dependency to be careful about
Here's the video ⤵
Super practical courses, with a no-nonsense approach, are designed to spark engineering curiosity and help you ace your career.
An in-depth, self-paced, and on-demand course that for early engineers to become great at designing scalable, available, and extensible systems at scale.
A masterclass that helps experienced engineers become great at designing scalable, fault-tolerant, and highly available systems.
A course that helps covers Redis internals by reimplementing its core features like - event loop, serialization protocol, pipelining, eviction, and transactions.
Arpit's Newsletter read by 56000+ engineers
Weekly essays on real-world system design, distributed systems, or a deep dive into some super-clever algorithm.