Design and Evolution of BaikalDB: A Cloud‑Native Distributed Database for Commercial Advertising Systems
This article examines the business storage requirements of large‑scale advertising platforms and details how BaikalDB was architected as a cloud‑native, MySQL‑compatible distributed database that combines OLTP, OLAP, KV and full‑text capabilities while ensuring high reliability, low cost and linear scalability.
Commercial advertising systems demand highly reliable, high‑performance storage that can handle diverse workloads such as OLTP transactions, OLAP analytics, high‑QPS queries, KV lookups and fuzzy searches.
Traditional monolithic databases cannot scale to these needs; BaikalDB was built as a cloud‑native, MySQL‑compatible distributed database that meets these requirements through a shared‑nothing architecture, region‑based sharding, RocksDB storage, and multi‑Raft replication.
The storage layer uses range‑based Regions as the smallest data unit, maps tables to a key‑value model, and supports primary indexes, local secondary indexes, global secondary indexes and full‑text indexes, all stored in RocksDB.
The compute layer parses SQL, generates execution plans using both rule‑based and cost‑based optimization, and pushes filters down to storage nodes; execution follows a volcano operator model where every operation implements open/next/close.
The scheduling layer (BaikalMeta) balances leader and peer distribution across nodes, handles automatic Region splits, and ensures fault tolerance without a single point of failure, using heart‑beat reports from BaikalStore instances.
Since its 2018 launch BaikalDB has stored over 600 TB across more than 1.5 K tables, serving billions of ad‑related queries with millisecond latency while maintaining linear scalability and low operational cost.
Flexible cloud deployment
One‑stop OLTP/OLAP capabilities
MySQL protocol compatibility
Baidu Intelligent Testing
Welcome to follow.
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.