</> 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 8: 18:59:59.999 - Deep Dive: The Last Ten Seconds

Executive Summary: Auction #7731 enters its final ten seconds with 50,000 watchers, 5,000 bidders and 2,000 bids on the way, many from sniping tools firing at T-2 seconds. Three things decide whether it survives. Who owns time: the server stamps accepted_at on ingress from NTP-disciplined clocks and compares it with end_time under the lock, so Theo's 19:00:00.050 bid is rejected whatever his phone said. What one row can take: a 2 ms transaction caps a row at 500 bids per second, the final second asks for exactly that, so #7731 is promoted to a fenced in-memory single writer good for about 3,000. And how 50,000 people watch without 10 million messages a second: coalescing to two state updates per second per auction. It closes with why eBay keeps the hard close that makes sniping rational.

The Scene

It is Sunday, 18:59:50 PT. Auction #7731 shows $11,900, Marcus has led since Tuesday at a maximum nobody else can see, and 50,000 open item pages are holding a stream. In the next ten seconds 2,000 bids will arrive: 200 a second on average, 500 in the final second, most of them from sniping services firing at T-2 seconds. The prompt said a hot auction must not fall over here; this is where you find out which parts of Section 7 bend.

Interviewer: "Theo's app shows 18:59:59 when he taps. Your server says he's late. Who's right?"

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.