Backend Development 13 min read

Evolution of Ctrip Vacation Product Log System: From Single‑Table DB to ES + HBase Platform

This article details the evolution of Ctrip's vacation product log system—from a simple single‑table DB in 2019, through a platformized ES + HBase architecture with custom RowKey design, to a V3.0 version that adds business and supplier empowerment, scalable storage, advanced search, and flexible data presentation for billions of daily change records.

High Availability Architecture
High Availability Architecture
High Availability Architecture
Evolution of Ctrip Vacation Product Log System: From Single‑Table DB to ES + HBase Platform

In Ctrip's vacation product line, daily operations generate over 6 billion change records across thousands of tables, accumulating more than 1.7 trillion log entries, making a robust log system essential for troubleshooting, BI analysis, and supplier interaction.

Development trajectory is divided into three phases:

V1.0 (pre‑2019) : Logs stored in a single DB table with unstructured text, leading to massive table size (>10 billion rows, 370 GB), poor performance, low readability, and tight coupling with business code.

V2.0 (2020‑2022) : Introduced a platformized solution using Elasticsearch for search and HBase for storage. RowKey is generated from five components (MD5 of PK, tableId, random suffix, log type, timestamp) to ensure uniqueness, distribution, and query efficiency. Logs are written via an API, queued through MQ, persisted to HBase, indexed in ES, with compensation via Redis on failure. Query flow retrieves RowKeys from ES, then fetches full logs from HBase.

V3.0 (2023‑2024) focuses on empowerment:

Business empowerment – horizontal scaling of ES and HBase, index partitioning by time, and customizable index fields (10 fields covering numeric, string, and date types).

Supplier empowerment – a B‑side log query UI that formats logs into business‑friendly representations (text, data association, enums, bit‑storage, field combinations, external API lookups, and diff comparison).

The system now supports flexible routing of logs to dedicated clusters per business line, provides extensible display configurations, and achieves sub‑500 ms query latency on trillion‑level data, while reducing manual troubleshooting effort for developers and suppliers.

BackendarchitecturescalabilityHBaseESdata storagelog system
High Availability Architecture
Written by

High Availability Architecture

Official account for High Availability Architecture.

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.