Video in progress

What is a cell-based architecture and when is it worth moving to it?

You split the system into identical, independent "cells": each has its own copies of the application, its own DB and cache, and users are partitioned across them. A failure or a bad deploy in one cell touches only its users, so the blast radius shrinks.

📖 Answer

With ordinary scaling, all users land on one big cluster. If a bad configuration or a "poison" request arrives, the entire customer base suffers at once. Cells limit that radius: with 20 cells, one problem touches about 5% of users.

The structure:

  • Cell router: a very thin layer that knows only the tenant → cell map and routes the request. It has to be the simplest and most reliable part, because everyone shares it.
  • Cell: a full stack, with services, its own DB and its own queues. Cells don't call each other.
  • Control plane: creating new cells, moving tenants, rolling out deploys cell by cell.

Deployment now becomes staged by nature: first an internal "canary cell", then 1 cell, then 25%, then everyone. If the problem shows up in one cell, it doesn't reach the others.

The cost is serious:

  • each cell having its own DB means N times the infrastructure cost and operational work;
  • data across cells (global search, analytics, cross-tenant features) needs a separate layer;
  • moving a tenant from one cell to another is a migration project in itself;
  • a big tenant can outgrow a single cell.

When it pays off: multi-tenant B2B, strict SLAs with large customers, a big audience, and "everyone went down at once" incidents that are very expensive for the business. With a small team and moderate load it's too early; starting with good canary deploys, feature flags and bulkheads is enough.