← Concepts

阅读中文版本

Cell-Based Architecture

Cell-based architecture groups a service and its dependencies into a self-contained cell with its own data and routing, so that a cell failure is contained and a cell deployment is independent of.

architecture

Definition

Cell-based architecture is a deployment topology where a cell packages an application with its own data store, configuration, and routing entry, so that each cell is independently deployable, independently scalable, and failure-isolated, and the system is a fan-out of cells behind a router rather than a mesh of shared-dependency services.

Context and scope

Applied in multi-tenant SaaS, regional deployments, and any system where blast radius and deployment independence justify the operational overhead of cell replication.

Common misconceptions

  • Cells are just microservices — a cell is a deployment boundary that contains multiple services and their data; a microservice is a single service
  • Cell-based architecture eliminates shared state — it eliminates shared state between cells; within a cell, services may share

Anti-patterns

  • Sharing a database across cells, so a database outage takes down every cell and the isolation is fictional
  • Routing without affinity, so a user request lands on a different cell each time and the per-cell state is useless

Related concepts

Authoritative source

https://aws.amazon.com/builders-library/cell-based-architecture/

What it is

Cell-based architecture is a deployment topology where a cell packages an application with its own data store, configuration, and routing entry, so that each cell is independently deployable, independently scalable, and failure-isolated, and the system is a fan-out of cells behind a router rather than a mesh of shared-dependency services. Applied in multi-tenant SaaS, regional deployments, and any system where blast radius and deployment independence justify the operational overhead of cell replication. The organizing principle is which decisions are hard to reverse and should be made once, versus which are easy to reverse and should be deferred.

How it works

Boundaries are drawn along axes of change: things that change together are colocated, things that change independently are separated by interfaces whose contracts are explicit and versioned. Dependencies point toward stability — domain logic depends on abstractions, infrastructure depends on domain, never the reverse. The structure makes the system’s intent legible without reading every module.

When to choose and pitfalls

Choose this structure when the system will outlive its first deployment and face requirements you cannot now predict. The pitfall is premature abstraction — adding indirection for a flexibility that never materializes, paying its complexity cost forever. The opposite pitfall is entangling concerns that later need to separate, forcing a rewrite instead of a refactor.