Backend Development 15 min read

Design and Evolution of Ctrip Ticket Booking System for Flash‑Sale Events

This article analyzes the challenges faced by Ctrip's ticket‑booking transaction system during high‑traffic flash‑sale events and presents a series of architectural optimizations—including Redis caching, database load mitigation, supplier‑system safeguards, and fine‑grained traffic‑control strategies—to achieve stable, consistent, and fast performance under extreme concurrency.

Wukong Talks Architecture
Wukong Talks Architecture
Wukong Talks Architecture
Design and Evolution of Ctrip Ticket Booking System for Flash‑Sale Events

Background – After the pandemic, the tourism industry revived rapidly, leading to frequent flash‑sale campaigns that generate billions of requests, pressuring the ticket‑booking system to maintain stability and performance.

Flash‑sale case analysis – Real‑world examples (e.g., 2020 "Huiyou Hubei", 2021 Beijing Universal Studios, 2023 Wuhan Zoo, 2024 IU concert) illustrate typical issues such as page latency, payment failures, and inventory inconsistencies caused by massive concurrent traffic.

System architecture goals – The system aims for three pillars: stability (steady service), accuracy (strong consistency), and speed (quick confirmation).

Stability: ensure uninterrupted sales flow.

Accuracy: guarantee data consistency and order fulfillment.

Speed: provide a smooth, fast booking experience.

3.1 Stability challenges and solutions

1) Redis overload & cache hotspots – Horizontal scaling alone cannot eliminate hot‑key imbalance; large keys also degrade performance.

Solutions – Implement multi‑level caching with automatic hot‑key detection, split large keys, compress cache objects, and establish a long‑term governance process to regularly scan and clean Redis.

2) Database overload – High‑traffic cache misses cause DB pressure.

Solutions – Replace cache‑delete with cache‑overwrite, aggregate change messages, and apply asynchronous cache updates via background workers.

3) Supplier‑system instability – External providers may be throttled or slow.

Solutions – Use a message‑queue buffer (peak‑shaving), automatic disabling of unstable suppliers, and retry mechanisms; combine with custom, product‑level rate limiting.

Traffic‑control optimization – Deploy SOA‑level and product‑level rate limiting, using sliding‑window algorithms to evenly distribute requests across pages and protect downstream services.

3.2 Write‑consistency challenges and solutions – Traditional relational DB row‑level locks become a bottleneck for inventory deduction.

Solution – Asynchronously deduct inventory: preload stock to Redis, deduct in Redis during the flash sale, then asynchronously update the DB, and handle refunds with a compensating workflow.

3.3 Achieving high‑availability sustainability

Continuous architecture health governance (system health, design health, engineering health) and dedicated large‑event/holiday reliability plans ensure the platform remains robust under unpredictable spikes.

Conclusion – By addressing read hotspots, write bottlenecks, strong transaction requirements, and fine‑grained traffic control, and by maintaining ongoing health checks and emergency plans, Ctrip’s ticket‑booking system achieves stable, high‑throughput operation even under extreme load.

backendSystem ArchitectureRedishigh concurrencytraffic controlDatabase Optimizationflash sale
Wukong Talks Architecture
Written by

Wukong Talks Architecture

Explaining distributed systems and architecture through stories. Author of the "JVM Performance Tuning in Practice" column, open-source author of "Spring Cloud in Practice PassJava", and independently developed a PMP practice quiz mini-program.

0 followers
Reader feedback

How this landed with the community

login 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.