Why Flipkart doesn't crash on Big Billion Day: pre-scaling, caching, waiting rooms and stock booking (System Design Part 14)

When a flash sale opens, Flipkart gets 1.5 million requests a second but can only turn about 2,000 a second into orders. How sale systems survive: pre-scaling, cached product pages, rate limiting and waiting rooms, atomic stock reservation, async order queues and load shedding, plus a ready interview answer.

By InternHack Team · · 8 min read · System Design

You open the app at 12:00 AM for the Big Billion Days deal, tap Buy, and get "Sold out" or "You are in queue". It feels like your internet failed. It didn't. That screen is the site protecting itself. This is System Design Part 14. It builds on Part 10 (CDN), Parts 11 and 13 (pub/sub fanout) and Part 12 (heartbeats and TTLs), which we won't re-teach.

Honesty note: Flipkart has not published a full write-up of its sale checkout and inventory system. The first-party facts are the request and order rates (Flipkart's CPTO, 2023), the more-than-5x traffic spike and elastic cloud (a Flipkart principal architect at Rootconf 2015), Aerospike as the low-latency store for pricing and inventory, and the Big Billion Day 2014 apology. Waiting rooms, atomic stock decrement, async order queues and load shedding are the standard flash-sale design (Cloudflare, Amazon, Alibaba and common practice), not "Flipkart's code".

The short answer

Flipkart doesn't survive by having one giant server. It survives by making sure most of the crowd never reaches the expensive part. Extra machines are booked before the sale. Product pages and prices are served from cache, so browsing never touches the database. A rate limit or waiting room lets in only as many people as checkout can handle. The real fight is the last units of a hot phone: stock is reduced in one atomic "decrement if more than 0" step and held for you for a few minutes while you pay, so two people can't buy the same phone. The order then goes into a queue and is processed in the background, and if the system is still overloaded, extra features are switched off so "Buy" keeps working.

Sign up free to unlock the full notes

Aage ke sections free InternHack account ke saath khulte hain:

  • The core problem: 750 requests for every order
  • The analogy: a Diwali sale at a TV shop
  • The flow, in order
  • One real failure: Big Billion Day 2014
  • You've seen this
  • Edge cases and limits
  • How to answer this in an interview
  • The question from the reel

Sign up free

Sources

  • Flipkart Stories, Q&A with CPTO Jeyandran Venugopal (1.5M requests/s, 2,000+ orders/s), Oct 2023: https://stories.flipkart.com/innovation-customer-first-qna-jeyandran-venugopal
  • Rootconf 2015, Scaling Flipkart Cloud (more than 5x spikes, a million VMs): https://hasgeek.com/rootconf/2015/sub/scaling-flipkart-cloud-a-million-virtual-machines--Q13qevZj2LwFtW3Go8wNbw
  • Aerospike, Flipkart's journey to 90 million QPS: https://aerospike.com/blog/flipkart-journey-90-million-qps
  • Flipkart Tech blog via daily.dev, Redis lock meltdown found in BBD load testing: https://app.daily.dev/posts/when-good-locks-go-bad-diagnosing-a-system-meltdown-under-load-evp32lkxu
  • CNCF, Flipkart chaos engineering: https://endusers.cncf.io/architectures/flipkart-chaos-engineering/
  • Inc42, Flipkart founders apologise for Big Billion Day (2014): https://inc42.com/buzz/flipkart-sorry/
  • Cloudflare Waiting Room docs: https://developers.cloudflare.com/waiting-room/about/
  • AWS, how AWS powered Prime Day 2024: https://aws.amazon.com/blogs/aws/how-aws-powered-prime-day-2024-for-record-breaking-sales
  • Alibaba Cloud, Double 11: https://intl.aliyun.com/customers/double-11
  • HackerNoon, designing a flash sale system that doesn't oversell: https://hackernoon.com/how-to-design-a-flash-sale-system-that-doesnt-oversell