Relational Cloud: a Database Service for the cloud

Carlo Curino, Evan P. C. Jones, Raluca A. Popa, Nirmesh Malviya, Eugene Wu, Samuel Madden, Hari Balakrishnan, Nickolai Zeldovich

Introduction

Presented at CIDR 2011, Relational Cloud is a research prototype from MIT designed to address the fundamental limitations of early Database-as-a-Service (DBaaS) offerings. While services like Amazon RDS simplified database management, they often struggled with three critical challenges: efficient multi-tenancy, elastic scalability, and robust data privacy. Relational Cloud proposes a "workload-aware" architecture that achieves high hardware consolidation and near-linear scaling while maintaining data confidentiality through encrypted query execution.

System Architecture

The Relational Cloud architecture is divided into a trusted environment (the client side) and an untrusted environment (the cloud provider). This separation is central to its security model.

Relational Cloud System Architecture

As shown in Figure 1, the system consists of several key node types:

  • Client Nodes: Run the user application and a trusted JDBC proxy (CryptDB-enabled) that handles encryption keys.
  • Frontend Nodes: Manage routing and distributed transaction coordination.
  • Backend Nodes: Store data in encrypted form and execute queries using the CryptDB encryption layer.
  • Admin Nodes: House the Kairos placement engine and the Schism partitioning engine.

Core Components

Kairos: Efficient Multi-tenancy

To avoid the performance overhead of traditional "DB-in-VM" approaches—which can be 6x to 12x slower due to redundant OS layers—Relational Cloud uses Kairos. Kairos consolidates multiple logical databases into a single physical DBMS instance. It employs a non-linear optimization solver to place workloads based on temporal correlation, effectively pairing complementary workloads (e.g., day-heavy and night-heavy) to maximize resource utilization.

Schism: Workload-Aware Partitioning

Scaling out relational databases typically requires complex manual partitioning. Schism automates this by treating the database as a graph where tuples are nodes and edges represent co-accessed data. By applying graph-partitioning algorithms to actual query traces rather than just static schemas, Schism minimizes expensive cross-node distributed transactions.

CryptDB: Privacy through Onion Encryption

The most distinctive feature of Relational Cloud is CryptDB, which allows the cloud provider to process SQL queries without ever seeing the plaintext data. It achieves this through "Onion Encryption."

CryptDB Onion Encryption Layers

As illustrated in Figure 3, data is wrapped in multiple layers of encryption, each supporting different classes of operations:

  • Randomized (RND): Provides maximum security but no query functionality.
  • Deterministic (DET): Allows for equality joins and selections.
  • Order-Preserving (OPE): Enables range queries, sorting, and min/max operations.
  • Homomorphic (HOM): Permits mathematical operations like addition on encrypted values.
  • Search: Supports keyword searches on encrypted strings.

The system dynamically "peels" these layers to the minimum level required for a specific query, ensuring that data remains as secure as possible at all times.

Evaluation and Results

The researchers evaluated the system using TPC-C benchmarks and real-world traces from services like Wikia and Wikipedia. Key findings include:

  • Consolidation: The system achieved hardware consolidation ratios between 6:1 and 17:1 compared to independent provisioning.
  • Scalability: For TPC-C workloads, Relational Cloud demonstrated a 7.7x speedup when scaling from 1 to 8 nodes.
  • Performance Overhead: CryptDB introduced a 22.5% reduction in throughput and approximately 0.5 ms of additional latency per statement—a trade-off deemed acceptable for the resulting privacy guarantees.

Conclusion

Relational Cloud demonstrates that it is possible to build a cloud database service that is simultaneously efficient, scalable, and private. By leveraging workload-aware placement and partitioning alongside innovative onion encryption, it provides a blueprint for secure and high-performance DBaaS.

Summary updated

BibTeX
@inproceedings{curino2011relational,
  author = {Carlo Curino and Evan P. C. Jones and Raluca A. Popa and Nirmesh Malviya and Eugene Wu and Samuel Madden and Hari Balakrishnan and Nickolai Zeldovich},
  title = {{Relational Cloud: a Database Service for the cloud}},
  booktitle = {CIDR},
  year = {2011},
}
Figure