Loading…
While this loads — quick one
Every subscriber must get each event. A queue, or pub/sub?
Loading…
While this loads — quick one
Every subscriber must get each event. A queue, or pub/sub?
Loading the challenge…
While this loads — quick one
Every subscriber must get each event. A queue, or pub/sub?
A ticketing site sells seats for concerts. For a popular show, a million people arrive in the same minute for fifty thousand seats. Each buyer picks specific seats, and a chosen seat must be held for them for ten minutes while they pay, so nobody else can take it in that time; if they do not pay, the seat returns to sale. No seat may ever be sold twice. The seat map is viewed far more often than seats are bought, and showing a seat as free for a few seconds after it was taken is acceptable, because the purchase itself is checked. The site must not fall over under the surge, even if that means buyers wait their turn.
Every system design question opens with an account. Your design is scored the same way every time, with the reason behind each requirement, and your attempts are kept so you can see what you found hard.