OceanBase TPC‑C Benchmark: Transaction Engine Design and ACID Guarantees
OceanBase’s TPC‑C benchmark demonstrates how its distributed database achieves high durability, atomicity, isolation, and consistency on commodity cloud servers using Paxos‑based log replication, two‑phase commit, MVCC, and replicated tables, highlighting the architectural challenges and solutions for ACID compliance.
Ant Financial’s self‑developed database OceanBase topped the TPC‑C benchmark, attracting industry attention; a series of five technical articles was released to explain the test, and this text is the fourth installment.
Unlike Oracle and DB2, which use dedicated storage hardware, OceanBase performed the benchmark on 204 data nodes plus 3 root nodes of Alibaba Cloud ECS ecs.i2.16xlarge instances, relying only on the local disks of these commodity servers, dramatically reducing hardware costs.
This hardware choice poses significant software‑architecture challenges, especially for ensuring ACID properties without the inherent reliability of specialized storage.
Paxos Log Synchronization Guarantees Durability – OceanBase persists transaction redo logs on three machines and uses the Paxos consensus protocol; once a majority (two of three) have safely stored the logs, the transaction is committed, and any failed node can recover its missing logs automatically.
A live audit demonstrated that forcibly cutting power to a node during sustained client load caused no data loss and the service continued without manual intervention.
Automatic Two‑Phase Commit Ensures Atomicity – For cross‑node transactions, OceanBase automatically selects a coordinator, sends Prepare messages to participants, waits for their redo and prepare logs, then issues Commit messages; this process is transparent to users and enables linear scalability of transaction processing.
Multi‑Version Concurrency Control Provides Isolation – Each transaction obtains a commit timestamp; writes create new versions while reads see only data committed before the transaction’s read timestamp, preventing dirty reads, non‑repeatable reads, and phantom reads. Row‑level locks protect concurrent updates, and a globally replicated timestamp service ensures high availability.
Consistency Guarantees – OceanBase passed all 12 consistency test scenarios defined by TPC‑C, leveraging its parallel query engine to accelerate verification SQL execution by several orders of magnitude.
Replication Table Feature – The ITEM table is replicated to every node, eliminating bottlenecks for order‑creation transactions; a broadcast protocol maintains ACID guarantees across replicas, and failed replicas are automatically excluded.
Conclusion – OceanBase demonstrates that a distributed database can deliver high reliability, availability, performance, and scalability on inexpensive cloud hardware, and the team will continue to optimize transaction performance and add new features.
Author : Han Fusheng, senior technical expert in the OceanBase team at Ant Financial, one of the original members responsible for the transaction engine and performance optimization.
AntTech
Technology is the core driver of Ant's future creation.
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.