Design The Ordering Path For A Ten Billion Subsidy Flash Sale

Last updated: November 29, 2026

Quick Overview

Design the backend that lets millions of shoppers compete for a few thousand heavily subsidized units released at a fixed time, without overselling, without collapsing the order and payment systems, and with fair, bot-resistant access.

Pinduoduo
System Design
Software Engineer
Pinduoduo
November 29, 2026
Software Engineer
System Design Round
System Design
Hard

0

0

0 solved


Design the backend that lets millions of shoppers compete for a few thousand heavily subsidized units released at a fixed time, without overselling, without collapsing the order and payment systems, and with fair, bot-resistant access.

Pinduoduo's Ten Billion Subsidy channel and timed flash sales create traffic spikes orders of magnitude above baseline, concentrated on a handful of SKUs at the same second. A strong answer layers traffic shedding, atomic stock control and asynchronous order creation, and the interviewer will push on hot keys, consistency between cache and database, and abuse.

What the Interviewer Expects
  • Quantifies the spike and the ratio of requests to units
  • Sheds load early: static pages on CDN, client-side jitter, rate limits, admission tokens
  • Decrements stock atomically in Redis with per-user limits and reconciles with the database
  • Creates orders asynchronously through a queue with idempotency keys
  • Handles unpaid-order timeouts and returns stock
  • Covers bot and scalper defenses
Key Topics to Cover
flash sale
rate limiting
Redis Lua
message queues
idempotency
hot keys
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • Redis primary fails over mid-sale and loses the last second of writes. What happens to stock?
  • How would you give a fair chance to users on slow phones in lower-tier cities?
  • How do you test this before the real event?
  • How would you shard a single SKU with 5,000 units and 2 million requests per second?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional: show the item and a countdown, let a user try to buy at T0, limit one per user, create an order, take payment within 15 minutes, release unpaid stock. Non-functional: zero oversell, the re...

High-Level Design

Layers, each cheaper than the next: (1) the product page and countdown are static on CDN, and the client adds random jitter of a few hundred ms and disables the button after one click. (2) The gateway...


Submit Your Answer
Markdown supported

Related Questions