The Desi Architect
Notes / Booking and Search / Seat Hold Simulator
Track 3 · Booking and Search

Seat Hold Simulator

Hold a Tatkal berth in an in-memory Redis simulator, let holds expire mid-payment, race a rival booking agent, and simulate server crashes. Compare Production architecture against the Naive lock implementation to observe the exact race conditions that cause double-booking.

Interactive12 min read1 interactive
On this page
  1. What this lab is for
  2. The simulator
  3. Concurrency analysis: Naive locks vs Production architecture
  4. The correct design in code
  5. Common mistakes
  6. One more thing I would check in review