Scrivio Interview library
DesignAdvanced6 min read · updated 12 November 2026

A single bad deployment of a shared service recently took down all customers in all regions. Explain how a cell-based architecture applies the bulkhead idea at system level, and how you would introduce it.

A cell-based architecture splits the platform into several independent copies of the full stack, called cells, each serving a fixed subset of customers, so a bad deployment or failure stays inside one cell and affects only its customers. A thin, very simple routing layer maps each customer to a cell, and changes are rolled out one cell at a time with a pause between cells. Shared dependencies across cells weaken the isolation and must be minimised, and because cells add cost and operations work, we introduce them first on the most critical customer-facing paths.

Why this question is asked

When one bad deployment of a shared service takes down every customer in every region, the problem is not the bug, because bugs will always happen. The problem is the blast radius: everything shared one failure domain. Interviewers ask about cell-based architecture to see whether we can apply the bulkhead idea at the scale of a whole system and introduce it without stopping the business. In this answer, we will recap why the incident spread, define cells and the routing layer, see how deployments move through cells, look at the shared dependencies that undermine them, and plan an incremental introduction with honest costs.

1A Quick Recap: Blast Radius and Why the Incident Spread

Blast radius is the share of customers affected when something fails. In the incident, every region called one shared service, for example a global configuration or entitlement service, and the bad version was deployed everywhere within minutes. Regions gave us protection against a data centre failure, but not against our own changes, because the same code and the same shared service ran in all of them.

A bulkhead inside a service limits how many threads a dependency may use. A cell applies the same idea to the whole system: instead of limiting resources, we limit the customers any single failure can reach.

2What a Cell Is

A cell is a complete, independent copy of the stack, with its own services, databases, caches and queues, serving a subset of customers. If we have 10,000 customers and 8 cells, each cell serves about 1,250 of them. Cells do not call each other in the normal request path, and each cell's data belongs only to its customers.

So when a cell fails, whatever the reason, a bad deploy, a poison message, a runaway query, only that cell's customers are affected, roughly one eighth of the business instead of all of it. Cells are also sized to a known maximum, so that we test one cell size well and grow by adding cells, not by making one giant deployment bigger.

Step throughA cell-based platform
  1. Clientsweb, mobile, partner APIs
  2. Cell routercustomer id -> cell, nothing else
  3. Cell 1 ... Cell 8full stack each: services, database, cache, queues
  4. Minimal shared control planecell assignment table, deployment tooling

4 layers, from the top down. Step through them one at a time.

Each cell serves about one eighth of customers; a failure inside a cell stays there.

3The Routing Layer Must Be Boring

Something has to decide which cell a request goes to. That is the cell router: it reads the customer or tenant id from the request, looks up the cell in an assignment table, and forwards the request. Because every request passes through it, it is the one component whose failure still affects everyone, so it must be as simple and reliable as possible. It holds no business logic, changes rarely, caches the assignment table locally so it keeps routing if the table's store is unavailable, and is itself deployed in stages.

A common design keeps the mapping in a small replicated store and has the router load it into memory every few seconds. New customers are placed into the cell with the most spare capacity, and moving a customer between cells is a deliberate, rare operation that copies its data first.

4Deploying Cell by Cell

Cells only limit the blast radius of a deployment if we stop deploying everywhere at once. Each change goes first to a canary cell, often one holding internal users or low-risk customers, then waits, for example an hour, while automated checks compare its error rates and latency with the other cells. If they look healthy, the change moves to one more cell, then to the rest in waves. If anything looks wrong, the pipeline stops and rolls back, and only the cells already updated were affected.

Step throughStaged rollout by cell
  1. Deploy to canary cellinternal and low-risk customers
  2. Bake for one hourcompare errors and latency
  3. Healthy?
    YesDeploy to the next cellNoStop and roll back that cell
  4. Deploy to cells in waves1, then 2, then the rest
  5. Global changes lastrouter and control plane, most carefully

5 steps in order. Play them, or step through them one at a time.

Had this been in place, the bad deployment of the shared service would have broken the canary cell, the bake period would have caught it, and the other seven cells would never have received it.

5Shared Dependencies Undermine Cells

The benefit of cells disappears wherever something is shared. If all eight cells call one global identity service or one shared database, a failure there still takes down everyone, exactly as in the original incident. So each critical dependency should either live inside each cell or, when it must be global, be designed so cells keep working without it for a while, for example by caching identity signing keys and entitlements locally.

An audit of cross-cell calls is part of the work. Every remaining shared piece should be small, rarely changed, deployed in stages itself, and have a documented plan for what cells do when it is down.

6Introducing Cells Without Stopping the Business

Cells cost money and work. We run more copies of every service and database, capacity is less pooled, and operations must handle many deployments, many dashboards and customer moves. So we do not convert everything at once. We start with the most critical customer-facing path, for example checkout and orders, build one new cell next to the existing platform, treat the existing platform as cell zero, and move a small group of customers into the new cell. We learn from that, automate cell creation, then add cells and move customers gradually.

In the meantime, two cheaper steps capture much of the benefit: staged deployments by region with a bake period, and removing the single shared service that caused this incident from the synchronous path.

7Follow-up questions

How do you choose the number and size of cells?

From the largest size we can test and operate confidently, and from the blast radius the business accepts. If losing more than 15 percent of customers at once is unacceptable, we need at least 7 cells. Very large customers may get dedicated cells so they do not dominate one cell's capacity.

What about features that need data across all customers, such as global reporting?

They read from copies of the cell data, for example through events sent to a central analytics store, outside the request path. A failure in that store affects reporting, not customer transactions.

How is a cell different from a region?

A region protects against infrastructure failure in one location. A cell protects against failures of our own software and data, and several cells can live in one region. Many platforms use both: cells inside each region.

8Conclusion

In this answer, we applied the bulkhead idea at system level. Cells are independent copies of the stack that each serve a subset of customers, behind a deliberately simple router, and changes move through them one at a time with a bake period. Shared dependencies weaken the isolation, so we minimise them, and because cells add cost and operations work, we introduce them incrementally on the most critical paths first.

What to say in the interviewAbout 100 seconds aloud

Open with

The incident spread because everything was one failure domain: all regions used one shared service and the bad version went everywhere at once, so regions protected us from data centre failures but not from our own changes.

Then, if they want more

A cell-based architecture applies the bulkhead pattern to the whole system. We run several independent copies of the full stack, each with its own services, database and caches, and each serves a fixed subset of customers, for example eight cells of about twelve hundred customers each.

A failure inside a cell, whether a bad deploy or a poison message, affects only that cell's customers. In front sits a cell router that maps a customer id to a cell and forwards the request. It must be very simple, hold no business logic, cache its mapping, and change rarely, because it is the one thing every request touches.

Deployments go to a canary cell first, bake for an hour while we compare metrics with the other cells, and then move cell by cell, so the bad deployment in this incident would have stopped at one cell.

Shared dependencies between cells remove the benefit, so I would audit them and either move them into each cell or make cells able to work without them for a while.

Cells add real cost and operational work, so I would start with the critical path, like checkout, add one new cell next to the existing platform, move customers gradually, and meanwhile introduce staged rollouts with bake time right away.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "A single bad deployment of a shared service recently took down all customers in all...": https://scrivio-interview-library.netlify.app/spring-boot/resilience/99bd6e359c/