Microservices, one picture at a time
27 chapters that build on Microservices Patterns by Chris Richardson, now enriched with ideas from Building Microservices, Bootstrapping Microservices, Practical Event-Driven Microservices Architecture and Decomposing the Database. Every idea starts as a diagram, with only a few plain words around it. Follow the story of FTGO, a food-delivery company escaping its monolith.
Learning path
The chapters follow the groups of the microservice pattern language: decomposition, communication, transactional messaging, data management, external APIs, testing, cross-cutting concerns, deployment and refactoring. Each pattern has one home chapter.
Part 1 Foundations
Monolith or microservices, and what you trade
Part 2 Decomposition
Finding service boundaries and modelling the domain
Part 3 Communication style
Remote procedure invocation, messaging and brokers
Part 4 Transactional messaging and domain events
Outbox, log tailing, idempotent consumers and event design
Part 5 Data management
Database per service, sagas, event sourcing, API composition and CQRS
- 08 Database per service and the shared database Private data, the shared-database anti-pattern, views and reporting databases
- 09 Managing transactions with sagas Sagas, compensation, orchestration vs choreography, eventual consistency
- 10 Event sourcing Event streams, snapshots, the broker as event store, replay and compaction
- 11 Queries: API composition and CQRS API composition, CQRS views and caching reads
Part 6 External API and UI
API gateway, backends for frontends and UI composition
Part 7 Testing
Unit, service component, contract and end-to-end tests
Part 8 Cross-cutting concerns
Security, externalized configuration, chassis, observability and reliability
- 16 Security, configuration and the chassis Access tokens, defense in depth, externalized configuration, microservice chassis
- 17 Observability Health checks, log aggregation, distributed tracing, metrics and SLOs
- 18 Resilience and stability patterns Timeouts, retries, circuit breakers, bulkheads, CAP and chaos
Part 9 Deployment and scaling
Deployment patterns, serverless, pipelines and scaling
- 19 Deployment patterns and Kubernetes Service per VM or container, Kubernetes, IaC and progressive delivery
- 20 Serverless deployment Function as a Service, its limits, and choosing PaaS, FaaS or containers
- 21 Continuous integration and delivery pipelines CI, branching, pipelines, artifacts and repository layout
- 22 Scaling microservices Scaling axes, sharding, database scaling, caching and autoscaling
Part 10 Refactoring to microservices
Strangler application and decomposing the database
Part 11 Organization
Teams and evolutionary architecture
Part 12 Hands-on: FlixTube
Build and run a real microservices app end to end