</> MAANG.io
system design · 301

Advanced

Master system design interviews with scalable architecture patterns, distributed systems, and real-world design challenges.

0/480 solved 0% complete

Section 12: The Box Office Closes - Final Summary & Candidate Scorecard

Executive Summary: We replay the interview as the signal each phase recorded, then give a 100-point scorecard with the answers that cost points here: the Redis lock, the locked section, "just autoscale", charging before holding. Jordan's morning becomes a cold trace to run aloud, score bands map totals to readiness, and a short catalog shows where the question hides under other names.

The prompt looked like CRUD, and for an average day of 6.3 orders a second a CRUD drawing is roughly right. The interviewer was scoring whether you found the two problems inside it: many fans grabbing the same seat at the same instant, and 3,000,000 people arriving for 60,000 seats. Nearly every point comes from how you handled those two.

The Arc, Replayed as Signal

The interview arc replayed as signal: Framing and requirements recorded seeing contention and a flash crowd behind the CRUD; Scale estimation recorded that the hot show is 6 MB, so admission not size; API and data model recorded at most once enforced twice by predicate and constraint; Architecture recorded map reads off the inventory with the hot show in its own cell; Holds and the waiting room recorded one conditional write and 67 fair admissions a second; Challenges, reliability, evolution recorded mechanism plus number under pressure

Section What you did Signal the interviewer recorded
1. Problem Understanding & Clarifications Asked about seating type, hold length, payment, limits; named bots as users Found the contention and the flash crowd before drawing a box
2. Requirements (Functional & Non-Functional) Seat sold at most once; all-or-nothing holds; hold p99 ≤ 500 ms; served map ≤ 2 s behind the database Invariants a test could check
3. Scale Estimation & Workload Analysis 33,000 joins/s; 150× over a 20,000 req/s design load; 67 admissions/s; sell-out in about 6 min The problem is contention and admission
4. API Design (with Pushback) Hold as a resource; 409 with alternatives; idempotent checkout A lost race becomes a sale; a retry never becomes a second charge
5. Data Modeling Row per seat per show; GA counters; unique (show_id, seat_id) The invariant lives in the schema
6. High-Level Architecture 7.5 KB bitmap from the change stream; inventory partitioned by show Reads kept off the inventory
7. Deep Dive: Seat Holds & Contention Conditional updates in sorted seat order, lazy expiry, row-count check, the 4-ticket limit inside the hold Correctness in one statement
8. Deep Dive: The On-Sale & the Virtual Waiting Room Edge-issued signed tokens, a sealed random draw, watermark with feedback Admission control, fairness designed in
9. Interviewer Deep-Dive Challenges Bots, slow PSP, hoarding, double click, stale map A mechanism and a number per escalation
10. Reliability, Fairness & Abuse Failover with admission paused; rotating barcodes Failure planned for mid-on-sale
11. Follow-up Feature Evolution Resale, lotteries, price-locking holds, flights New features extend the model

Key Insight: Two mechanisms do most of the work. The hold turns "sold at most once" into a property of one statement. The waiting room turns 3,000,000 arrivals into 20,000 active shoppers. Almost every other choice protects one of them (idempotency, the unique constraint, bot defences) or keeps load off them (the bitmap, 100,000 edge polls/s).

Quick check before moving on:


Sign in to continue reading

The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.

Sign in to read the full lesson

Sign in to MAANG.io

Use your Google or Microsoft account — no password to remember.

Continue with Google Continue with Microsoft

Please accept the terms above to continue.