SpinTheMic
Pro

Interview practice question

Flash sale on one product row

System Design · Databases · Experienced

During a flash sale, thousands of requests per second try to decrement stock for one product, causing lock contention and timeouts. How do you redesign it?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Single hot row is the bottleneck.
  • Pre-split stock into buckets.
  • Redis atomic decrement as gate.
  • Queue purchase requests.
  • Reconcile with DB asynchronously.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics