Databases 17 min read

Design and Evolution of TRocks: A Persistent KV Database Built on Kvrocks at Ctrip

This article describes Ctrip's journey from using Redis to developing TRocks, a persistent key‑value database based on Kvrocks, covering background, challenges, research, architectural enhancements, performance and cost evaluations, and future development plans.

Ctrip Technology
Ctrip Technology
Ctrip Technology
Design and Evolution of TRocks: A Persistent KV Database Built on Kvrocks at Ctrip

Background: Ctrip's technical assurance team accumulated extensive experience in Redis governance on private cloud and introduced Kvrocks on public cloud to reduce costs, prompting the exploration of a persistent KV database for high‑performance, low‑cost, massive workloads on private cloud.

Problems: Existing Redis solutions faced limitations such as low storage capacity, lack of persistence, high memory costs, inability to provide atomic operations like select‑for‑update, and insufficient consistency, leading to the need for a more capable KV store.

Research and Selection: The team evaluated mainstream NoSQL/NewSQL databases based on industry adoption, middleware maturity, cluster operation and governance, performance, and extensibility, ultimately selecting Kvrocks for its compatibility with Redis tooling and mature operational ecosystem.

From Kvrocks to TRocks: TRocks (Trip + Kvrocks) was created with functional enhancements (distributed lock, composite commands), availability improvements (semi‑synchronous replication with IDC mode), full‑sync suppression mechanisms, and operational governance features (horizontal scaling, multi‑datacenter Sentinel deployment, leader election tuning).

Performance and Cost Data: After internal deployment, TRocks runs nearly 2,000 instances handling over 10 TB of data, achieving comparable latency to Redis while offering higher compression (3‑7×) and up to 90 % cost savings; performance benchmarks show 80‑100 k QPS on SATA SSDs and 3‑5× higher QPS on NVMe SSDs.

Future Plans: The roadmap includes further composite command enhancements, checkpoint integration, migration to NVMe SSDs, and community contributions such as upstreaming semi‑synchronous replication.

Recruitment Notice: Ctrip’s technology assurance team is hiring engineers for infrastructure, container, storage, and big‑data projects; interested candidates can email [email protected] with the appropriate subject line.

performanceCost OptimizationKV Storecloud infrastructurekvrockspersistent databaseTRocks
Ctrip Technology
Written by

Ctrip Technology

Official Ctrip Technology account, sharing and discussing growth.

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.