MicroservicePatterns.com

Suggestions

  • PagePattern catalogAll patterns by category.
  • LabCircuit Breaker and Retries labCrash a dependency and tune the breaker.
  • LabSaga labFail a step and watch the compensations run.
  • PagePractice questionsScenario questions with explanations.
  • PageDesign reviewCheck your own architecture for anti-patterns.
Milestone · Data management

Data management track

Learn all 8 data management patterns, complete the labs in this category and answer its practice questions, getting at least 70% right.

What it covers

  • Database per Service Each service owns its data. Everyone else reaches it through the service's API or events.
  • Shared Database Several services read and write the same database. Simple at first, and the main thing that stops services being independent.
  • Saga Run a multi-service business transaction as local transactions plus compensating actions.
  • Transactional Outbox Save the data change and the event it must produce in one local transaction, then publish from that table.
  • API Composition Answer a query that spans services by calling each one and combining the results.
  • CQRS Use one model to handle commands that change state and separate read models built for the queries you need.
  • Event Sourcing Store every state change as an immutable event and derive the current state by replaying them.
  • Change Data Capture Turn every committed database change into an event by reading the database's own transaction log.
  • Saga lab Run an order across inventory, payment and shipping. Fail a step and watch the compensations run, then add missing refunds, duplicate messages and failed compensations. Switch between orchestration and choreography.
  • Transactional Outbox lab Crash a service between its database write and its event publish, and count lost events, ghost shipments and duplicates. Then switch on the outbox and an idempotent consumer and compare.
See the data management patterns →

Milestones are free and need no account. Your progress is tracked in your own browser, so a milestone marks learning you did, not a certification. See the terms.