Introduction
For decades, a central tenet of database design has been that distributed transactions are a performance killer. The prevailing wisdom suggested that as soon as a transaction spans multiple nodes, scalability collapses due to network overhead and coordination bottlenecks. This paper introduces NAM-DB, a system that shatters this myth. By leveraging high-speed RDMA networks and a decentralized timestamp oracle, NAM-DB achieves linear scalability, reaching over 6.5 million transactions per second on a 56-node cluster.
The Problem: The Distributed Transaction Bottleneck
In traditional distributed databases, transactions spanning multiple nodes are notoriously slow. This inefficiency stems from two primary bottlenecks: the massive CPU overhead required to process standard network stacks (like TCP/IP) and the limited bandwidth of older Ethernet networks.
To mitigate this, developers have historically relied on "sharding" or "locality-aware partitioning"—painstakingly designing applications so that data needed for a single transaction resides on the same machine. However, this approach is fragile, complex to manage, and fails for applications like social networks that are inherently difficult to partition. NAM-DB addresses a fundamental question: Can we redesign the database so that every transaction is distributed by default, yet the system still scales out linearly?
NAM-DB Architecture
The authors propose a new architecture called NAM-DB (Network-Attached-Memory Database) built on the logical decoupling of resources. Unlike traditional architectures where each node manages its own local storage and compute, NAM-DB separates these concerns into two distinct layers.
- Compute Servers: These are stateless nodes that execute transaction logic. They do not store the primary data but act as the "brains" of the operation.
- Memory Servers: These act as "dumb" shared memory pools holding the actual data. They are accessed directly by compute servers using Remote Direct Memory Access (RDMA).
Methods: Leveraging RDMA and Decentralized Timestamps
The core innovation of NAM-DB lies in how it utilizes one-sided RDMA operations. This allows a compute server to read or write data directly from a memory server's RAM without involving the memory server's CPU. This bypasses the traditional network bottleneck and saves CPU cycles for transaction processing rather than network stack management.
To support Snapshot Isolation (SI) without a central bottleneck, NAM-DB introduces a Decentralized Timestamp Oracle. Traditional SI relies on a single global counter for "start" and "commit" times, which quickly becomes a point of contention. NAM-DB replaces this with a timestamp vector where each compute thread has its own slot, allowing timestamps to be generated and updated in parallel. Additionally, the system employs a multi-versioning scheme where the "current" version of a record is always positioned for a single RDMA read, while older versions are moved to circular buffers to support long-running queries.
Key Results and Performance
The system was evaluated using the TPC-C benchmark, the industry standard for measuring On-Line Transaction Processing (OLTP) performance. The results were transformative:
- Linear Scalability: NAM-DB scales almost perfectly linearly. On 56 machines, it achieved 3.64 million distributed transactions per second without any locality optimizations.
- Peak Throughput: With locality optimizations enabled, performance jumped to 6.5 million "new-order" transactions per second (or 14.5 million total transactions per second).
- Resilience to Distribution: While traditional systems like H-Store see a 90% performance drop when transactions become 100% distributed, NAM-DB maintains high throughput, proving that the distributed transaction penalty is a byproduct of old architecture, not an inherent law of physics.
Limitations and Future Work
While NAM-DB proves that distributed transactions can scale, challenges remain. Currently, fault tolerance requires a full system halt and recovery if a memory server fails. Furthermore, while hash indexes are handled efficiently via RDMA, more complex structures like B+-trees still require "two-sided" communication to avoid excessive network round-trips. Designing "RDMA-friendly" tree structures remains a key area for future research.
Summary updated