Monolith vs Microservices

Compare monoliths, modular monoliths and microservices: trade-offs, service boundaries, data ownership, sagas, gateways, strangler-fig migration and teams.

Start course →

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

  1. What a Monolith Really Is
  2. What Microservices Are
  3. The Architecture Spectrum and Conway's Law

Trade-offs and Choosing

  1. What Microservices Give You
  2. The Distributed Systems Tax
  3. Choosing an Architecture

The Modular Monolith

  1. Modules With Real Boundaries
  2. Bounded Contexts and Domain-Driven Design
  3. Data Ownership Inside a Monolith

Designing Services

  1. Finding Service Boundaries
  2. Database per Service and Querying Across Services
  3. Communication: Sync, Async and Contracts

Infrastructure for Many Services

  1. API Gateways and Backends for Frontends
  2. Service Discovery, Configuration and Service Mesh
  3. Independent Build and Deployment

Consistency, Resilience and Observability

  1. Consistency Without Distributed Transactions
  2. Designing for Partial Failure
  3. Observability Across Services

Migrating Between Styles

  1. The Strangler Fig Pattern
  2. Extracting a Service Safely
  3. When to Merge Services Back

Organisation, Pitfalls and Revision

  1. Teams and Ownership
  2. Common Anti-Patterns
  3. Case Study: An E-Commerce Platform Over Five Years
  4. Revision and Interview Questions