Monolith vs Microservices
Compare monoliths, modular monoliths and microservices: trade-offs, service boundaries, data ownership, sagas, gateways, strangler-fig migration and teams.
What you'll learn
- Explain monoliths, modular monoliths and microservices and where each sits on the architecture spectrum.
- Weigh the real benefits of microservices against the distributed systems tax and choose an architecture.
- Structure a modular monolith with bounded contexts, enforced module APIs and per-module data.
- Design service boundaries, data ownership and sync or async communication with stable contracts.
- Handle consistency, partial failure and observability across many services.
- Migrate safely with the strangler fig pattern and align teams, ownership and platform to the architecture.
Syllabus
Two Ways to Build a System
Trade-offs and Choosing
The Modular Monolith
- Modules With Real Boundaries
- Bounded Contexts and Domain-Driven Design
- Data Ownership Inside a Monolith
Designing Services
- Finding Service Boundaries
- Database per Service and Querying Across Services
- Communication: Sync, Async and Contracts
Infrastructure for Many Services
- API Gateways and Backends for Frontends
- Service Discovery, Configuration and Service Mesh
- Independent Build and Deployment
Consistency, Resilience and Observability
- Consistency Without Distributed Transactions
- Designing for Partial Failure
- Observability Across Services