Lesson 01 of 16 · Cells
Why cells
A cell is a complete, independent copy of your product serving a subset of tenants. See why cells limit the damage of failures and bad changes, what stays global, the rules that keep cells independent, and what cells cost.
One big platform, one big blast radius
A shared platform serving every customer from the same clusters, databases and queues is efficient until something goes wrong: a bad configuration, a runaway tenant, a database failover, a bug in a new release. Then every customer is affected at once.
Cell-based architecture splits the platform into many independent, identical cells. Each cell is a full copy of the product (gateway, services, databases, caches, queues) serving a subset of tenants. A failure or bad change inside one cell affects only its tenants.
A ship is divided into watertight compartments. If one floods, the doors close and the ship stays afloat. A ship that is one big open hall sinks from a single hole.
┌──────────── global layer (thin) ────────────┐
users ──────► │ edge · routing tier · identity · tenant map │
└───────┬──────────────┬──────────────┬───────┘
▼ ▼ ▼
┌─ cell 1 ─┐ ┌─ cell 2 ─┐ ┌─ cell N ─┐
│ services │ │ services │ │ services │
│ DB, cache│ │ DB, cache│ │ DB, cache│
│ queues │ │ queues │ │ queues │
└──────────┘ └──────────┘ └──────────┘
tenants A-F tenants G-M tenants …
What cells give you
- Smaller blast radius: a failure, a noisy tenant or a bad release hurts a few percent of tenants, not all.
- Safer releases: deploy to one cell, watch, then widen (the rings lessons).
- Predictable scale: you scale by adding cells of a known, tested size instead of growing one system into unknown territory.
- Isolation options: large or regulated tenants get their own cells, from the same code.
- Easier capacity and cost reasoning: a cell has measured limits and a known cost.
The rules that keep cells independent
- No cross-cell calls on the request path. A tenant's request is served entirely inside its cell.
- A thin global layer holds only what must be global: the edge, a routing tier that maps tenant → cell, identity, and the tenant directory. Keep it small, simple and extremely available.
- Static stability: cells keep working if the global control plane is down. Routing uses cached maps; deployments pause, traffic does not.
- Same code, different parameters. Cells differ in size, region and compliance settings, never in forks of the code.
- Cells are cattle. Built entirely from code (infrastructure, add-ons, apps), so a new cell takes hours, not months, and a broken one can be rebuilt.
What cells cost
- More infrastructure and some duplication (each cell has its own databases and add-ons).
- Fleet tooling becomes mandatory: GitOps across many clusters, labelled clusters, automated cell creation, observability across cells.
- Cross-tenant features (global search, analytics across all customers) need separate, asynchronous pipelines, outside the request path.
- Tenant moves between cells must be engineered (lesson 4).
Cells, shards and shuffle sharding
- A shard usually splits one component (a database); a cell splits the whole stack.
- Shuffle sharding assigns each tenant to a random combination of resources, so two tenants rarely share all of them; useful inside a cell for workers or queues, to contain a noisy or poisonous tenant further.
Try it
Draw your current (or a familiar) platform. Circle every component shared by all tenants on the request path. For each, write what a failure would mean for customers and whether it could live inside a cell instead. The circles that remain are your future global layer; aim to keep it very small.
Recap
- A cell is a complete, independent copy of the product for a subset of tenants; cells shrink blast radius.
- Keep a thin global layer, no cross-cell calls on the request path, static stability, same code everywhere.
- Cells cost duplication and require fleet automation; they pay back in safety, predictable scale and isolation options.
This site is a public version of my personal engineering knowledge hub. It intentionally excludes confidential company information and internal operational details.