Skip to main content
QUICK REVIEW

[Paper Review] FoundationDB Record Layer: A Multi-Tenant Structured Datastore

C. Chrysafis, Ben Collins|arXiv (Cornell University)|Jan 14, 2019
Advanced Database Systems and QueriesComputer Science23 references5 citations
TL;DR

The FoundationDB Record Layer is an open-source, stateless, multi-tenant structured data store built on FoundationDB that provides relational-like semantics—including schema management, rich indexing (including versioned and cross-type indexes), and declarative queries—while inheriting ACID transactions and scalability. It enables massive multi-tenancy by isolating each tenant’s data and indexes into logical databases, powering CloudKit to manage billions of user databases with high performance and low maintenance overhead.

ABSTRACT

The FoundationDB Record Layer is an open source library that provides a record-oriented data store with semantics similar to a relational database implemented on top of FoundationDB, an ordered, transactional key-value store. The Record Layer provides a lightweight, highly extensible way to store structured data. It offers schema management and a rich set of query and indexing facilities, some of which are not usually found in traditional relational databases, such as nested record types, indexes on commit versions, and indexes that span multiple record types. The Record Layer is stateless and built for massive multi-tenancy, encapsulating and isolating all of a tenant's state, including indexes, into a separate logical database. We demonstrate how the Record Layer is used by CloudKit, Apple's cloud backend service, to provide powerful abstractions to applications serving hundreds of millions of users. CloudKit uses the Record Layer to host billions of independent databases, many with a common schema. Features provided by the Record Layer enable CloudKit to provide richer APIs and stronger semantics with reduced maintenance overhead and improved scalability.

Motivation & Objective

  • To address the challenges of building a scalable, highly available, and consistent backend for stateful services with multi-tenancy and strong consistency.
  • To provide a lightweight, extensible, and stateless layer on top of FoundationDB that supports structured data, schema evolution, and complex query capabilities.
  • To enable efficient, isolated, and scalable multi-tenancy by encapsulating each tenant’s data and indexes into logical databases without sacrificing transactional integrity.
  • To reduce application development complexity and maintenance overhead by offering rich database abstractions such as nested records, versioned indexes, and materialized aggregates.
  • To demonstrate that a layered, extensible database architecture can support large-scale production workloads like CloudKit at industrial scale.

Proposed method

  • The Record Layer builds a record-oriented data model using Protocol Buffer messages to represent structured, typed, and nested data records.
  • It provides schema management and evolution tools to support changing application data models over time.
  • It supports a rich set of index types, including secondary indexes, versioned indexes (on commit timestamps), and cross-type indexes, using FoundationDB’s atomic mutations for conflict-free concurrent updates.
  • The layer is stateless, enabling horizontal scaling of compute by adding more instances without state coordination.
  • It uses a streaming query execution model with a query planner that leverages indexes to efficiently execute declarative queries.
  • It exposes extensive extension points for custom index types, serialization (e.g., encryption, compression), and query operators, enabling deep customization.

Experimental results

Research questions

  • RQ1How can a layered, stateless database system provide strong ACID semantics and rich query capabilities while supporting massive multi-tenancy at scale?
  • RQ2What architectural patterns enable efficient, conflict-free, and concurrent index maintenance in a distributed key-value store?
  • RQ3How can a system support billions of isolated logical databases with shared infrastructure while maintaining performance and low operational overhead?
  • RQ4What mechanisms enable extensibility in a database layer without compromising consistency or performance?
  • RQ5Can a high-level data abstraction built on a low-level transactional key-value store match or exceed the capabilities of traditional relational databases in real-world production systems?

Key findings

  • The FoundationDB Record Layer successfully supports billions of isolated, multi-tenant databases in production, used by Apple’s CloudKit to serve hundreds of millions of users.
  • The layer enables powerful features such as transactional full-text indexing and high-concurrency zones, improving application development and system performance.
  • By using atomic mutations for index updates, the system achieves conflict-free, concurrent index maintenance even under high load.
  • The stateless design allows seamless horizontal scaling of compute, decoupling it from data placement and simplifying load balancing.
  • The extensibility model enables clients to plug in custom index types and serialization logic, supporting use cases like encrypted storage and specialized aggregations.
  • The system demonstrates that a layered architecture on a distributed key-value store can deliver relational-like capabilities with strong consistency and high scalability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.