Nodivex from TraitSpan
Beginner–Intermediate

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.

Retail Technology20–35 min

Context for this system design kata

Prevent double-charges and duplicate orders during peak demand and retries. This system design kata keeps the stakes low so you can rehearse trade-offs before taking ideas into production reviews.

Scenario and practice focus

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.

Difficulty: Beginner–Intermediate. Estimated time: 20–35 min. Domain: Retail Technology.

Constraints to balance

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.

Scenarios to explore in the simulator

Trade-off prompts
  • 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.

Learning outcomes

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.
Ready to run
Open this kata in the simulator.

Give it a try!

Open the app