PrepCity

Design a flash sale

Open the lab

By the last page, this is the design you will have built.

Lesson · 12 pages · about 11 min

Design a flash sale

Amazon-style checkout for 10,000 consoles and two million buyers: the read-then-write race that oversells, a lock that makes one long line, and one short statement over split stock rows.

Words you’ll learn

  • Row
  • Capacity
  • Millisecond
  • Overselling
  • Request
  • FOR UPDATE
  • Database
  • On call
  • Single point of failure
  • Failover

Page by page