Coffee please
Prevent double-charges and duplicate orders during peak demand and retries.
Kata overview
You do not need to be an expert to start. This kata keeps the stakes low so you can explore trade-offs, adjust the diagram, and see how the system responds.
What this system design kata asks of you
During morning rush, customers place order-ahead purchases and repeatedly check status. When downstream payment processing becomes slow or flaky, customers retry and refresh. Correctness is non-negotiable: no double-charges, no duplicate orders, and a status view that catches up to the truth - while keeping checkout responsive.
Operational pressure
- Fully automated - no operator intervention during peak.
- Payment provider latency and error rates can degrade unpredictably.
Customer and product constraints
- Must prevent double-charge and duplicate order creation under retries.
Coffee please
Retail Technology · 20–35 min
Trade-offs to explore in the simulator
- Prevent double-charges and duplicate orders under retries.
- Keep checkout acknowledgement responsive during peak.
- Order status must catch up after temporary downstream slowdowns.
- Award loyalty points exactly once per completed purchase.
- Keep costs steady at peak without over-provisioning the entire stack.
What you will learn
- Design idempotent order creation and payment confirmation under retries.
- Choose a consistency stance that preserves customer trust during brownouts.
- Separate acknowledgement from confirmation while keeping the UX clear.
- Evaluate duplicate rates, confirmation lag, and read-model convergence over time.
Open Coffee please in the simulator
Sketch your first design, run the traffic and see what the review says. No signup required.