Monolith vs Microservices
A monolith is a single deployable unit containing all business logic. Microservices split that logic into independently deployable services communicating over the network.
Monolith = one giant Swiss Army knife (bulky but everything's right there). Microservices = a toolbox of separate tools (flexible but you keep losing the 10mm socket).
Monoliths are simpler operationally: one deploy pipeline, in-process calls, ACID transactions across modules, and a single observability surface. Microservices provide independent scalability, technology heterogeneity, fault isolation, and team autonomy — at the cost of distributed systems complexity: network partitions, eventual consistency, distributed tracing, and higher deployment overhead. The right choice depends on team size, domain complexity, and operational maturity. Teams under ~30 engineers rarely benefit from microservices.
The decomposition decision should be driven by bounded contexts, not technical convenience. Services that share a database are microservices in name only — they retain monolith coupling at the data layer. The modular monolith (well-separated internal modules with strict dependency rules) is underrated: it retains operational simplicity while maintaining architectural clarity, and it is far easier to extract genuine microservices from it later. Key anti-pattern: 'nanoservices' — services so fine-grained that they cannot make decisions independently and must call each other synchronously for every operation, creating distributed monolith latency without the autonomy benefit.
I default to a modular monolith for new products. Microservices make sense when: (1) distinct parts of the system have wildly different scaling profiles, (2) you need team autonomy across more than 3–4 teams, or (3) you have a proven bounded context that is stable enough to own its own schema. The migration path is always strangler fig — never a big-bang rewrite. The hardest part of microservices is not the technology; it's enforcing 'you own your data' so services don't share databases.
Saying 'microservices are more scalable' without qualification. A well-tuned monolith on read replicas often outperforms a naive microservices system with synchronous call chains. The bottleneck is almost always the database, not the application tier.