BlogsMetaCassandra Distributed Storage System

Cassandra Distributed Storage System

Cassandra Distributed Storage System

4
posts
2008–2021

Meta's infrastructure for storing and serving user content has evolved significantly, starting with photos and expanding to encompass immersive media like 360 video and VR. This evolution includes developing dedicated mobile applications, enhancing user experience for capturing and sharing, and tackling complex technical challenges in processing and delivering new media formats. Key developments include the creation of custom video filters for transforming equirectangular layouts to cube maps, and the integration of RocksDB as a storage engine for MongoDB to improve write performance and compression.

2021

How we built a general purpose key value store for Facebook with ZippyDB

8/6/2021

This post details the history, architecture, data model, and consistency guarantees of ZippyDB, Meta's largest strongly consistent, geographically distributed key-value store. It highlights the reuse of existing infrastructure like RocksDB, Data Shuttle, Shard Manager, and ZooKeeper, and introduces concepts like tiers, shards, μshards, and Akkio mapping. The post also explains ZippyDB's replication strategies (Paxos, async), consistency levels (eventual, read-your-writes, strong), and support for transactions and conditional writes.

2015

Parse now running MongoDB on RocksDB

4/30/2015

This post details Parse's production deployment of MongoDB on RocksDB, highlighting significant improvements in write performance (e.g., 50x faster inserts) and compression ratios (70%-90%). This allows for more indexes to fit into RAM, leading to faster overall performance by reducing disk seeks. The combination of MongoDB's features with RocksDB's efficiency is presented as a key advancement for their workloads.

2013

Under the Hood: Building and open-sourcing RocksDB

11/21/2013

This post introduces and open-sources RocksDB, an embeddable, persistent key-value store designed for high performance on modern hardware. It addresses challenges with traditional remote procedure calls by enabling direct access to fast storage, reducing network latency. RocksDB is built on LevelDB, focusing on scalability for multi-core servers, efficient storage utilization (IOPS, compression, write wear), and flexibility. It employs a log-structured merge-tree architecture with pluggable components for compression, compaction, and storage formats. Performance benchmarks show significant improvements over LevelDB, particularly for random writes and bulk uploads. Typical workloads include user-facing applications, spam detection, graph search, and message queues. The post details its architecture, performance characteristics, and suitable use cases, making the code available on GitHub.

2008

Cassandra – A structured storage system on a P2P Network

8/26/2008

This post introduces Cassandra, a new structured storage system designed for massive scale and high availability. It addresses the Inbox Search problem at Facebook by providing a distributed, fault-tolerant solution that scales incrementally across commodity servers. Key technical details include its data model (rows identified by keys, column families with columns or supercolumns, and columns with name, value, and timestamp), data distribution using consistent hashing with an order-preserving hash function for range scans, gossip-style cluster membership, and accrual-style failure detection. High availability is achieved through replication across data centers, with eventual consistency enabling reads from the closest replica and background repair. The post highlights its initial deployment for Inbox Search, managing TBs of data across 600+ cores and 120+ TB of disk space, and its open-sourcing as a beta version.