Skip to content

Blast radius design — engineering for the bad day, not the average day

A concept article on bounding blast radius in production: cell architecture, shuffle sharding, dependency containment, and the questions to ask before every new shared component.

A single shared cache cluster serves every tenant on the platform. It runs for two years without incident. Then one customer ships a query pattern that evicts the working set; the cache misses cascade into the database, the database falls behind, every tenant on the platform sees their request latency double, and the on-call is now triaging an incident that touches everyone instead of just the customer who caused it. This article frames the design discipline that prevents the cascade: bounding the blast radius of every failure before the failure happens, by the way components are wired, not by the way they are operated.

How to verify

# Which tenants share a backend? — the audit question
psql -c "SELECT customer_id, count(*) FROM connections GROUP BY customer_id ORDER BY 2 DESC LIMIT 20;"

# Are circuit breakers wired between upstreams?
curl -s http://app:9090/metrics | grep -E 'circuit_breaker_state|hystrix'

# Per-tenant rate limit headers
curl -sI -H 'X-Tenant: acme' https://api.example.com/ | grep -i rate

# Verify cell isolation — a tenant only touches its assigned cell
grep -E 'cell-id|cell_id' /var/log/app/access.log | awk '{print $5}' | sort -u

If a single tenant’s traffic appears in multiple cells, the routing is broken or the design is not actually celled. If circuit breakers are not present between high-fan-out dependencies, a single slow downstream will saturate every upstream connection pool.

What’s happening

The reliability term blast radius describes “how many users / tenants / requests are affected when a given component fails.” A platform whose blast radius equals 100% on every failure has no isolation. A platform with bounded blast radius limits any single failure to a small fraction of the surface area, even if the absolute failure rate is the same.

Three design moves bound blast radius:

  1. Cellular architecture. Split the platform into independently-operated cells, each containing a complete vertical slice of the stack (compute, cache, database). Route each tenant to a single cell. A failure in one cell affects only the tenants in that cell — at typical cell sizes of 10-50 tenants, that’s roughly 1-5% of the platform per cell rather than 100%.

  2. Shuffle sharding. For multi-tenant shared components, assign each tenant to a randomly-chosen subset of N nodes out of a pool of M (e.g. each tenant gets 2 of 8 worker queues). The probability that any two tenants share their entire shard is 1 / C(M, N) — very small. A single tenant’s failure in a worker affects only the small fraction of the platform sharing that exact subset.

  3. Bulkhead and circuit-breaker isolation. Within a single cell, prevent a slow downstream from saturating every upstream connection pool. Each upstream gets its own connection pool to each downstream, sized so that a saturated downstream cannot starve the upstream’s threads. A circuit breaker fails fast when the downstream’s error rate exceeds a threshold, freeing the upstream to serve other paths.

The mental model: blast radius is the product of (component shared by users) * (probability of failure) * (fraction of dependent surface area). Reduce any factor and the radius shrinks. Reduce the first factor (don’t share) and you eliminate the failure mode entirely for the unshared dependencies.

The procedure

  1. Audit every shared component. Walk the architecture diagram and tag each box with the set of tenants that touch it. Any box tagged “all tenants” is a blast-radius hot spot. Common offenders: the global database cluster, the central rate-limiter, the singular Redis cache, the shared message broker, the centralized auth service.

  2. For each hot spot, decide the right reduction strategy.

    • If the component is naturally partitionable (cache, queue, worker pool) → shuffle shard.
    • If the component is per-request stateless (compute) → run it inside a cell with its own dependencies.
    • If the component is a true singleton (control plane, auth, billing) → make it tiny, very stable, very well tested, with explicit RTO and a cross-region warm copy.
  3. Bound shared state at the database tier. A single database with all tenants is the classic blast-radius trap. Three escape paths:

    • Per-tenant database. Smallest blast radius, highest operational cost.
    • Per-cell database. Each cell of 10-50 tenants gets its own database. Blast radius = one cell.
    • Sharded with explicit tenant-to-shard mapping. Smaller cells, harder migration of a noisy tenant.

    Pick based on the cost of moving a noisy tenant: if you can move one in an hour, smaller cells are fine; if migration is a week, larger cells with shuffle sharding within the database (per-tenant connection pools, per-tenant query budgets) are more practical.

  4. Wire circuit breakers between every upstream/downstream pair. Every HTTP call to a downstream gets a circuit breaker with an explicit error-rate threshold, half-open recovery test, and a fallback path (serve cached data, return a degraded response). Without circuit breakers, a downstream that goes from 1% error rate to 50% will pin every connection in the upstream pool to the slow downstream, and the upstream becomes unavailable to its other consumers.

  5. Test the bound, not just the absence. Periodically inject failure into one cell or one shard and verify that only the expected tenants are affected. If a cell-1 failure causes p99 to spike platform-wide, the cells share something they shouldn’t — usually a control plane component or a stats aggregator. Find it and split it.

Common pitfalls

  • Calling something a “cell” without a complete vertical slice. A “cell” that shares a database with another cell is not actually a cell — the blast radius is the cluster of all cells sharing the database. Cells must be vertically independent or they don’t bound blast radius.
  • Shuffle sharding too few shards per tenant. N=1 means a single tenant pinned to a single shard; N=M (all shards) defeats the point. Typical N is 2-3 with M of 8-16; the math on C(M,N) collisions becomes attractive in that range.
  • Believing a stateless tier solves the problem alone. Stateless compute is easy to cell. The hard problem is data — the database, the cache, the shared message broker. If those aren’t celled, the stateless tier’s cells share fate through them.
  • Skipping bulkheads because “everything is fast.” Bulkheads are insurance against the day when nothing is fast. The day a downstream slows to 10s per request is the day the upstream needs the bulkhead. Wire them up front; the operational cost is near-zero.
  • Treating “auto-scaling” as a blast-radius reduction. Auto-scaling helps a single cell handle a surge; it does not bound which cells are affected by an upstream failure. The two solve different problems.

Stack Harbor designs and operates celled architectures across customer workloads, so a noisy tenant or a misbehaving deploy is bounded to its own slice of the platform rather than causing a platform-wide incident. The instrumentation, cell topology, and per-cell drill cadence are continuous, not one-off. See clustered environments for the operating model.