Grokking the System Design Interview, Volume II
0% completed
Step 6: Detailed Component Design
At noon, Maya presses the purchase button for Product X, a pair of headphones with 1,000 units in stock. In the same second, 50,000 other people press it too. Only 1,000 of them can get a pair, nobody may get two, and no pair may sit unsold because someone reserved it and walked away.
Maya's purchase raises five questions, and each section below answers one:
- How do 50,000 clicks line up without crushing the database? The per-product queue and its single consumer.
- While Maya waits, how does she see her place in line? Queue position from Kafka offsets. 3
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%