Microservices Lab: Interactive Simulations & Lessons
Failures, retries, circuit breakers, sagas and idempotency. A hands-on microservices lab with 6 interactive simulations and 6 lessons.
Failures, retries, circuit breakers, sagas and idempotency.
Every network call can be slow, fail, or succeed without you knowing. Kill services, inject latency and duplicate messages, then add the patterns that keep checkout alive.
Simulations
- Microservice Failure Cascade — Kill Payment, Inventory or Notification in a checkout chain and add timeouts, retries, breakers, async events and sagas.
- Circuit Breaker States — Degrade a dependency and watch the breaker trip from closed to open to half-open, with and without fallbacks.
- Retry Storm & Backoff with Jitter — Slow a service down and watch naive retries multiply traffic; add backoff, jitter and retry budgets to recover.
- Saga: Compensating a Failed Checkout — Run a checkout saga as orchestration or choreography; fail any step and watch compensations unwind it.
- Idempotency Keys & Duplicate Payments — Click “Pay” on a flaky network, retry, and see duplicate charges disappear once idempotency keys are enabled.
- DDD Bounded Contexts Workshop — Sort ShopFlow concepts into bounded contexts, see where “Customer” and “Product” mean different things, and check coupling.
Lessons
- Why Microservices Exist — and When Not to Use Them — Level 9 · Microservices
- Synchronous vs Asynchronous Communication — Level 9 · Microservices
- Timeouts, Retries & Retry Storms — Level 9 · Microservices
- Circuit Breakers & Bulkheads — Level 9 · Microservices
- Idempotency: Making Retries Safe — Level 9 · Microservices
- Distributed Transactions: 2PC, Sagas & the Outbox — Level 9 · Microservices
Also explore
- Break the System — Page
- Build a Circuit Breaker — Build it yourself
- Build a Retry Mechanism — Build it yourself
- Build a Simple Event Bus — Build it yourself
Other labs
- Kafka Lab — Logs, partitions, keys, consumer groups and ordering.
- Database Internals Lab — Storage engines, indexes, replication and partitioning.
- Transactions Lab — Isolation anomalies, lost updates and distributed transactions.
- Caching Lab — Hit rates, TTLs, invalidation, stampedes and CDNs.
- Architecture Lab — Evolution, decisions, characteristics and fitness functions.