SSTable and GFS Dependencies
What you'll learn: How BigTable relies on SSTables stored in GFS to achieve durable, efficient data storage and retrieval.
The Core Idea
BigTable doesn't manage raw disk storage itself. Instead, it stores all its persistent data in SSTables (Sorted String Tables), which are immutable sorted files saved in GFS (Google File System). This separation of concerns lets BigTable focus on data organization while GFS handles replication, durability, and fault tolerance.
How It Works
An SSTable is a persistent, immutable file containing sorted key-value pairs. Once written, it's never modified—only read or eventually deleted. This immutability makes them simple to cache, replicate, and share across servers.
GFS provides the distributed storage layer. When a BigTable Tablet Server writes an SSTable, GFS automatically replicates it across multiple machines (typically three copies). This means:
- Durability: If a Tablet Server crashes, the SSTable data survives in GFS
- Fast recovery: A replacement Tablet Server can simply re-open the SSTables from GFS
- Efficient reads: GFS handles file serving, block caching, and network optimization
The Dependency Chain
Think of it like a library system: BigTable is the librarian organizing books (data) by subject, while GFS is the building with shelves, security, and backup systems. The librarian doesn't worry about fire protection—that's the building's job.
When you read from BigTable, the Tablet Server fetches SSTable blocks from GFS. Because SSTables are sorted, BigTable can use binary search for efficient lookups. Bloom filters (covered earlier) help skip SSTables that don't contain the requested key.
Key Takeaway: SSTables stored in GFS give BigTable durable, immutable storage with automatic replication, allowing Tablet Servers to focus on serving data rather than managing disk failures.