The waiting room
Give patients a fast booking acknowledgement while processing confirmations asynchronously.
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.
Context for this system design kata
Give patients a fast booking acknowledgement while processing confirmations asynchronously. This system design kata keeps the stakes low so you can rehearse trade-offs before taking ideas into production reviews.
Scenario and practice focus
Monday mornings are chaos. Patients wake up, feel ill, and all try to book a GP appointment at once. The platform needs to say "we've got your booking" within 200ms - but the actual confirmation requires calling a slow clinic system that takes 1โ3 seconds to respond. The answer is async: accept the booking instantly via a fast path, drop it onto a queue, and let a background service confirm with the clinic at its own pace. But queues aren't free - under sustained load, queue wait times grow. The trick is balancing fast acknowledgement against keeping end-to-end time in check.
Difficulty: Intermediate. Estimated time: 25โ40 min. Domain: Healthcare.
Constraints to balance
Operational pressure
- Fully automated - no operator intervention during the Monday rush.
- Clinic management systems are external and slow (200ms+ base latency).
Customer and product constraints
- Budget is tight - the platform serves hundreds of clinics on shared infra.
Scenarios to explore in the simulator
- Give patients an instant "booking accepted" response.
- Process confirmations even when clinic systems are slow.
- Keep queue backlogs from growing unbounded during peak demand.
- Keep costs controlled during the Monday morning spike.
Learning outcomes
- Distinguish between acceptance latency and processing latency as separate SLAs.
- Use queues to decouple fast acknowledgement from slow downstream processing.
- Monitor queue wait as a health signal for async architectures.
- Choose component sizing for queue consumers based on downstream throughput.
Give it a try!