Loading…
A short voice session: one question, one follow-up, then instant feedback — up to 5 minutes.
Microservices are useful when independently deployable domains, team autonomy, scaling requirements, or strong isolation justify the operational complexity. A modular monolith is often better when the domain is still changing, the team is small, or independent deployment and scaling are not yet valuable.
Microservices are not automatically an architectural improvement. They introduce network communication, distributed failure modes, observability requirements, deployment complexity, data ownership challenges, and more difficult local development.
A modular monolith can provide strong domain boundaries while keeping deployment and communication inside one process. For example, an e-commerce application can have separate modules for orders, payments, inventory, and users with explicit interfaces between them.
Microservices become more attractive when there is a real need for independent deployment, independent scaling, team autonomy, technology isolation, or failure containment. For example, a video-processing service may require very different compute resources from the API serving user profiles.
The boundaries should generally follow business capabilities rather than technical layers. Each service should ideally own its data and expose a well-defined contract. Otherwise, a system can become a distributed monolith where services must be deployed together and constantly make synchronous calls to each other.
For a senior engineer, the important part is explaining trade-offs. I would start with the simplest architecture that satisfies current requirements, establish clear modules and observability, and extract services when the business or operational requirements justify the additional complexity.