System design paper · 2006

Bigtable

Chang, Dean, Ghemawat, Hsieh, Wallach, Burrows, Chandra, Fikes and Gruber · OSDI 2006

How Google stored huge tables on thousands of ordinary servers: one sorted map, ranges of rows per server and files that are never edited.

A table is kept in sorted order and cut into ranges of rows. Each range, called a tablet, lives on one server, so a lookup for one row goes to one machine. The picture shows two rows per tablet; a real tablet holds about 100–200 MB.

You’ll learn to

  • Describe Bigtable’s data model, a sorted map from row, column and time to a value, and why the row name decides performance.
  • Explain how a table is cut into tablets and how a client finds the server that holds one row.
  • Follow a write through the log, memory and sorted files, and say what merging those files achieves.
  • Name what later systems kept, changed or dropped.

Read first: Google File System

The idea in short

Google ran dozens of products, from web search to satellite maps, and each needed to store huge amounts of data on thousands of ordinary servers. A traditional database could not spread that far, so Bigtable offers something plainer: one giant table whose rows are kept in sorted order, with every value stamped with a time.

The sorted table is cut into ranges of rows, called tablets, and each tablet is served by one machine. A machine never edits a file in place. It writes each change to a log (a file that only grows at the end), keeps recent changes in memory, and saves them as sorted files that are only ever merged later. That makes writes fast and crash recovery simple.

The problem

By the mid-2000s Google was running dozens of products that all stored data in different shapes. The crawl tables held hundreds of terabytes of web pages. Google Earth held satellite images. Google Analytics held a row for every visitor session on every site that used it. Together they needed petabytes of room, spread across thousands of ordinary servers, and they ranged from batch jobs that read everything to services that had to answer users quickly.

A single database server could not hold this. Commercial databases that spread across many machines existed, but the authors say they wanted something else: control over how data is laid out on disk, and a system Google could change when it needed to. They also already had two building blocks. One was GFS, a file system that spreads huge files across many servers (see the GFS guide). The other was Chubby, a small lock service that keeps a few servers in agreement so that others can ask “who is in charge?”. What was missing was a way to turn files into tables that many programs could read and write at once.

So Bigtable was designed over about two and a half years, and by 2006 it was used by more than sixty Google products. By August 2006 there were 388 clusters outside testing, many of them idle for long periods, running on about 24,500 servers.

The question the paper answers is: what is the simplest table-like store that grows to thousands of machines, serves both batch jobs and live users, and lets its users decide where their data sits?

The design choices

Bigtable gives up much of what a relational database offers: no SQL query language and no general transactions that span several rows. The authors say it “does not support a full relational data model”. What it keeps is small enough to spread across many machines.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan

About the paper

Bigtable: A Distributed Storage System for Structured Data by Chang, Dean, Ghemawat, Hsieh, Wallach, Burrows, Chandra, Fikes and Gruber, OSDI 2006.

Read the original paper

More System design papers

All papers