Design and Evolution of Qunar Order Center: From 1.0 to 3.0
The article details the Qunar Order Center's architecture evolution—addressing fragmented order data, introducing unified query APIs, JSON‑based storage, merge/diff services, asynchronous I/O, Elasticsearch integration, data sharding, business isolation, rate limiting, adapter layers, micro‑service decomposition, and a centralized configuration system to improve scalability, reliability, and maintainability.
Background: Qunar’s rapid business expansion created multiple product lines, each with its own order system, resulting in fragmented order data, cumbersome integration for call centers, poor user experience, and inconsistent order formats.
Core capabilities of the Order Center include a unified order query API (searchable by phone, user name, device ID, order ID, etc.), order change messaging (diff‑based notifications), a unified user‑centric order list, and an order data warehouse for building user profiles.
1.0 Architecture: Orders were stored as JSON in a MySQL secondary index; a JSON‑based Merge and Diff service generated change events and abstracted business operations. Asynchronous I/O was used to fetch business‑line interfaces, preventing thread blockage during high‑latency calls. Challenges included reliance on in‑memory filtering, a single‑database capacity limit, and a severe outage caused by scalper traffic that exhausted memory and triggered frequent Full GC.
2.0 Improvements: To support diverse query conditions, Elasticsearch was introduced in early 2015, providing full‑order field indexing with dynamic templates and yearly index partitions. Data synchronization to ES used a message‑driven approach, ensuring consistency via versioned updates. QClientDB abstracted complex MySQL structures, while QMQ guaranteed order‑index consistency. Historical data was off‑loaded to HBase, and a message‑driven pipeline coordinated acknowledgments across MySQL, ES, and HBase.
3.0 Enhancements: After a February outage caused by scalper‑generated high traffic, the system abandoned in‑memory filtering and added a generic business‑level rate‑limiting module that isolates users and routes them to separate databases. An adapter layer, managed via Groovy scripts in QConfig, handles client version compatibility. The core module was split into micro‑services (MySQL index service, order storage service) and a centralized configuration center unified all module settings. Business isolation, rate limiting, and configuration management improved stability and deployment speed.
Overall, the Order Center progressed from a monolithic MySQL‑centric design to a scalable, micro‑service‑oriented platform leveraging Elasticsearch, HBase, asynchronous processing, and robust configuration and rate‑limiting mechanisms.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Ctrip Technology
Official Ctrip Technology account, sharing and discussing growth.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
