Evolution of Qunar Flight Ticket Transaction System Architecture and Database Refactoring

This article details the step‑by‑step evolution of Qunar's domestic flight ticket transaction system, covering early monolithic design, service‑oriented decomposition, database schema migration, adoption of non‑relational storage, and the implementation of an ELK‑based logging and monitoring platform to improve scalability and maintainability.

Qunar Tech Salon
Qunar Tech Salon
Qunar Tech Salon
Evolution of Qunar Flight Ticket Transaction System Architecture and Database Refactoring

Gong Ke from Qunar presents the architectural evolution of the domestic flight ticket transaction system, describing the initial simple three‑system structure with per‑agent sharding, an order index, and the challenges caused by policy imports, monolithic code, and costly deployments.

To address these issues, the team applied service‑oriented decomposition based on high QPS, business module independence, and common services, extracting policy, ticket issuance, and payment functionalities into separate services, thereby reducing coupling and deployment risk.

As the core system grew to tens of thousands of lines of code, a refactor was undertaken: a unified main order flow was defined with four abstract interfaces (order creation, payment, pre‑validation, detail retrieval), allowing sub‑systems to implement these interfaces and enabling parallel order creation.

Database challenges such as online schema changes and field explosion led to the adoption of pt‑online‑schema‑change, an order‑extension key‑value table, and eventually a non‑relational JSON‑based order detail table with sections and versioning, supporting flexible business concepts without altering the schema.

The new unified order table stores only a key_value and version, while each section holds JSON data, enabling daily sharding, simplified read/write control, and easier migration to Elasticsearch for analytics.

For monitoring, the team built an ELK stack (Flume, Kafka, Logstash, Elasticsearch, Kibana) to collect, parse, and visualize intercept logs, providing dashboards and alerting via QTalk for operational issues.

The final architecture presents a modular backend with clear service boundaries, unified interfaces, scalable storage, and robust logging, greatly improving maintainability and system resilience.

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.

System ArchitectureELKOrder Managementservice decomposition
Qunar Tech Salon
Written by

Qunar Tech Salon

Qunar Tech Salon is a learning and exchange platform for Qunar engineers and industry peers. We share cutting-edge technology trends and topics, providing a free platform for mid-to-senior technical professionals to exchange and learn.

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.