Design and Optimization of Taobao's Large‑Scale Flash Sale (秒杀) System

This article explains how Taobao built a high‑traffic flash‑sale platform by isolating hot data, separating static and dynamic content, applying time‑slice throttling, real‑time hotspot detection, and numerous backend optimizations such as Java concurrency tuning, local caching, queueing and database‑level row‑lock scheduling.

Architecture Digest
Architecture Digest
Architecture Digest
Design and Optimization of Taobao's Large‑Scale Flash Sale (秒杀) System

Taobao's flash‑sale (秒杀) system originated from a timed product‑listing feature that caused sudden traffic spikes; to protect the main product‑detail service, a dedicated high‑concurrency system was created.

Key data : During the 2013 Xiaomi flash‑sale, front‑end QPS exceeded 600k, backend cache clusters peaked at 20 million requests per second, and the highest order‑processing TPS reached 1,500 /s.

Hotspot isolation is achieved at three levels: business isolation (separate marketing activity registration), system isolation (dedicated deployment groups and domain names), and data isolation (exclusive cache clusters or MySQL instances for hot data).

Static‑dynamic separation caches 90 % of page data on the client or CDN, leaving only the "refresh‑抢宝" button to request minimal dynamic data, which improves performance by over three times.

Time‑slice throttling adds a quiz before purchase to stretch the order burst from 1 s to 2‑10 s, reducing the impact of automated bots and smoothing the load.

Real‑time hotspot discovery collects hotspot keys from middleware (Tengine, Tair, HSF) within 3 s, publishes them via a hotspot service, and allows downstream systems to apply protective measures.

Key technical optimizations include:

Using raw Servlets and output streams instead of heavyweight MVC frameworks.

Local in‑process caches for static product data and short‑lived caches for inventory.

Layered data validation (static‑dynamic split, client‑side cache, web‑side cache, write‑side checks, DB consistency).

Queue‑based write handling at both application and MySQL InnoDB layers, with Alibaba‑contributed patches for row‑level concurrency control and fast commit/rollback.

Overall principles for large‑scale traffic systems are isolation, dynamic/static separation, and layered validation, applied across the entire request chain to ensure stability and performance.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

cachingHigh Concurrencybackend optimizationFlash Salehotspot isolation
Architecture Digest
Written by

Architecture Digest

Focusing on Java backend development, covering application architecture from top-tier internet companies (high availability, high performance, high stability), big data, machine learning, Java architecture, and other popular fields.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.