BigTable Tablets and Tablet Servers
What you'll learn: How BigTable partitions large tables into manageable chunks called tablets and assigns them to tablet servers for distributed storage and retrieval.
The Core Idea
BigTable doesn't store entire tables on a single machine—that would be impossible at scale. Instead, it divides each table into tablets, which are horizontal partitions containing contiguous ranges of rows (sorted by row key). Each tablet is then assigned to a tablet server that handles all reads and writes for that specific row range.
Think of it like a library system: instead of one librarian managing millions of books, the library divides books alphabetically (A-C, D-F, G-J, etc.) and assigns each section to a different librarian. Each librarian (tablet server) is responsible for their specific range of books (tablet).
How Tablets Work
A tablet typically contains rows from a starting row key up to (but not including) an ending row key. For example:
- Tablet 1: rows "aardvark" to "customer"
- Tablet 2: rows "customer" to "elephant"
- Tablet 3: rows "elephant" to "zzz"
When a table grows too large, BigTable automatically splits tablets into smaller ones. Conversely, small tablets can be merged. This dynamic splitting and merging keeps tablets at an optimal size (typically around 100-200 MB).
Tablet Servers
Each tablet server manages multiple tablets (usually 10-1000) and handles:
- Read and write requests for its assigned tablets
- Tablet splitting when they grow too large
- Serving data from memory (memtable) and disk (SSTables)
If a tablet server fails, its tablets are quickly reassigned to other servers, ensuring continuous availability.
Key Takeaway: BigTable scales horizontally by partitioning tables into tablets (contiguous row ranges) and distributing them across tablet servers, similar to how HBase uses regions and region servers.