Google Bigtable: Row-Key Design and Hotspot Engineering
One sorted key space, no secondary indexes, and a row key that decides everything - including whether you have a hotspot.
Bigtable is the database the Bigtable paper described, running as a managed service, and it is the most minimal data model in this programme. A table is a **sorted map from row key to a set of cells**. There is one index - the row key. There are no secondary indexes, no joins, no `WHERE` clause on a value worth relying on, no query language, no transactions beyond a single row, and no aggregations. What you get in exchange is scale that is effectively unbounded, latency in single-digit milliseconds that holds as you grow, and an operational model where adding capacity is changing a number.
Overview
That makes this course narrower and deeper than most. There is very little API surface to learn - read a row, read a range, write cells, a conditional write, a read-modify-write - and almost all the difficulty is in two places. The first is **row key design**: encoding a hierarchy into a string so that your queries become range scans, and salting or field-promoting so that sequential writes do not land on one tablet. The second is **diagnosing distribution**, for which Google provides **Key Visualizer** - a heat map of your key space over time - which is the single most useful diagnostic tool in this programme.
Seven modules, about 75 hours. The capstone is an IoT telemetry service with salted row keys, retention policies and a hotspot analysis.
Introduction
For a sandbox, the **Bigtable emulator** (`gcloud beta emulators bigtable start`) is free, local and supports the data API, which covers Modules 1 to 3. What it cannot do: tablet splitting, node scaling, replication, backups, Key Visualizer or real latency - so Modules 4, 5 and 6 need a real instance. **A Bigtable instance is one of the more expensive things in this programme**, billed per node-hour with a minimum, so the laboratory instructions include teardown steps and you should use the **SSD single-node development configuration** and delete it between sessions.
Use the **`cbt` CLI** for exploration - it is terse, it maps closely to the API, and it makes the data model visible. Examples use the **Python client**, which is the clearest for teaching.
One framing to carry through. In most databases you ask "what index do I need?" Here you ask "what does the row key have to look like for this to be a range scan?" If the answer is "there is no such key", you either write the data a second time under a different key, or you accept a full scan, or you use a different system. Those are the only three answers, and knowing that early saves a lot of time.
What you will be able to do
- Explain instances, clusters, nodes and tablets, and what each scales
- Explain the data model: row keys, column families, qualifiers, cells and timestamps
- Use the emulator for development and a real instance for the rest
- Design row keys that turn queries into contiguous range scans
- Encode hierarchies and reversed timestamps into keys correctly
- Explain why sequential keys hotspot, and apply salting and field promotion
- Use filters, and state precisely what they do and do not reduce
- Configure garbage collection policies per column family
- Use single-row atomic mutations, conditional mutations and read-modify-write
- Explain what Bigtable does not offer transactionally, and design around it
- Use batch operations and app profiles
- Read Key Visualizer and act on what it shows
- Diagnose a hotspot and distinguish it from insufficient capacity
- Explain the read and write cost model and the per-node throughput limits
- Configure replication and routing profiles, and state the consistency implications
- Perform backup and restore, and record a measured RPO and RTO
- Implement least privilege IAM and encryption options
- Configure autoscaling and monitoring, and produce a cost checklist
What each level covers
5 levels · 7 lessons
-
Beginner - Foundations
The data model and the emulator; then the row key design that is the whole of Bigtable modelling.
2 lessons 15 min of reading
Start with Instances, Tables, Column Families and Cells → -
Intermediate - Application Behaviour
What is atomic and what is not, and the app profiles that route your traffic.
1 lesson 9 min of reading
Start with Atomic Mutations, Conditional Writes, Batches and App Profiles → -
Advanced - Performance and Reliability
Tablets, Key Visualizer and the cost model; then replication, routing consistency and recovery.
2 lessons 16 min of reading
Start with Tablets, Hotspots, Key Visualizer and Throughput → -
Expert - Security and Production Architecture
IAM, encryption, autoscaling and the monitoring that distinguishes a hotspot from a shortage.
1 lesson 9 min of reading
Start with IAM, Encryption, Autoscaling, Monitoring and Quotas → -
Capstone
One telemetry service, defended on key design, Key Visualizer evidence and a measured node count.
1 lesson 8 min of reading
Start with Capstone - IoT Telemetry Service →
Guides and articles
Longer reading about this subject, written alongside the course.
Before you start
- A Google Cloud project with billing (the free tier does not include Bigtable)
- The Bigtable emulator, the cbt CLI, and the gcloud SDK
- Python 3.11 or later with google-cloud-bigtable
- The programme's shared foundations
Common questions
- What does the Google Bigtable: Row-Key Design and Hotspot Engineering course cover?
- It is 5 levels and 7 lessons: Beginner - Foundations; Intermediate - Application Behaviour; Advanced - Performance and Reliability; Expert - Security and Production Architecture; Capstone. Each level ends with a quiz, and the last one is an exam over the whole course.
- How long does it take?
- About 57 minutes of reading and exercises - roughly 1 hours. It is self-paced with no cohort and no start date, so you can leave and come back and the site remembers where you were.
- What do I need to know first?
- A Google Cloud project with billing (the free tier does not include Bigtable). The Bigtable emulator, the cbt CLI, and the gcloud SDK. Python 3.11 or later with google-cloud-bigtable. The programme's shared foundations.
- Is it free?
- Yes. Every lesson, example and quiz in this course is free to read, and you do not need an account to read them. Signing in only adds progress tracking and quiz results.
- What will I be able to do afterwards?
- Explain instances, clusters, nodes and tablets, and what each scales. Explain the data model: row keys, column families, qualifiers, cells and timestamps. Use the emulator for development and a real instance for the rest. Design row keys that turn queries into contiguous range scans. Encode hierarchies and reversed timestamps into keys correctly. Explain why sequential keys hotspot, and apply salting and field promotion. Use filters, and state precisely what they do and do not reduce. Configure garbage collection policies per column family. Use single-row atomic mutations, conditional mutations and read-modify-write. Explain what Bigtable does not offer transactionally, and design around it. Use batch operations and app profiles. Read Key Visualizer and act on what it shows. Diagnose a hotspot and distinguish it from insufficient capacity. Explain the read and write cost model and the per-node throughput limits. Configure replication and routing profiles, and state the consistency implications. Perform backup and restore, and record a measured RPO and RTO. Implement least privilege IAM and encryption options. Configure autoscaling and monitoring, and produce a cost checklist.