How do a monolith and microservices differ, and when should you split?
Short answer
A monolith deploys as one unit, calls are method calls, one shared transaction; microservices split into independently deployed services, each owning its data, calling each other over the network. Split when many teams need independent deploys or parts need to scale differently, not because it's "more modern".
3 points to say:
- Microservices trade complexity in code for distributed complexity: slow and failing networks, lagging data, debugging across services.
- The reason to split is organizational first (Conway's law, many teams), then different scaling; start with a modular monolith.
- Avoid a distributed monolith: having to deploy several services together is the clearest sign.
Keep reading the deep dive
Create a free account to read the full explanation and follow-up questions, mark questions as studied and review them on a schedule.