Single tenant is the architecture you choose when you are afraid, and it is the right fear to have early. One customer, one stack, one blast radius. Nothing a customer does can touch anyone else, because there is no anyone else in their cluster. It is also, at 156 customers, a way to set fire to several million dollars a month and call it isolation. This is the story of taking commercetools Frontend the other way, and the e-commerce reality that made it hard.
I led the multi tenant architecture work for commercetools Frontend and moved the existing book of business onto it. The headline numbers are real and I will defend each one below, but the numbers are not the interesting part. The interesting part is everything that has to be true for a migration like this to not take down somebody’s checkout on the one day of the year that pays for their fourth quarter.
156 copies of the same thing, idling
Here is what single tenant looked like in practice. Every customer got their own deployment of the Frontend stack: their own compute, their own caches, their own autoscaling group, their own everything. Each one sized for that customer’s peak, because you cannot have a luxury retailer’s site fall over during a launch. Which means each one sat mostly idle the other 360 days of the year, holding capacity for a spike that comes a few times a year.
Multiply one over-provisioned, mostly idle stack by 156 and you can see the bill without me telling you. We were paying for 156 Black Fridays every single day, and getting one, maybe twice a quarter per customer. The isolation was genuine and the waste was enormous, and both things were true at once.
Single tenant, before
- One full stack per customer, sized for that customer's annual peak.
- Capacity reserved 24/7 for spikes that happen a few times a year.
- A fix or an upgrade had to be rolled out 156 separate times.
- Perfect isolation, catastrophic utilisation. Most CPUs idle most of the time.
Multi tenant, after
- A shared, elastic pool that many tenants draw from, isolated by config and quotas, not by hardware.
- Capacity follows real aggregate demand, so one tenant's quiet hour pays for another's rush.
- One deploy reaches everyone, so fixes ship once and land everywhere.
- Isolation enforced in software: per tenant limits, routing, and data boundaries.
Where 4.6 million a month actually came from
People assume a number like that comes from one clever trick. It does not. It comes from four unglamorous things, in roughly this order of size.
- Reclaimed idle compute. The big one. Consolidating 156 peak-sized stacks into one elastic pool meant we stopped paying for capacity that existed only to wait. Pool utilisation went from the low teens to the high fifties.
- Shared caching and CDN. A shared edge and cache layer means a catalogue image or a rendered category page requested by one tenant’s traffic warms the path for the whole pool’s similar requests. Origin load dropped hard.
- Right-sized data and network. 156 isolated stacks meant 156 of everything downstream: load balancers, NAT gateways, inter-zone traffic, log pipelines. Collapsing those removed a long tail of per-stack overhead nobody had ever been able to see clearly.
- Commitment leverage. One large, predictable aggregate workload is something you can actually buy savings plans against with confidence. 156 small, unpredictable ones are not.
How Black Friday is actually managed
Black Friday is not one spike. It is a shape, and if you have run it a few times you can draw the shape from memory. A doorbuster spike at local midnight when the deals go live. A dip while people sleep. A long climb through the morning as the working world wakes up and shops from its desk. And then the real peak in the evening, when everyone is home, on the couch, with a phone. Cyber Monday is the same shape three days later, flatter and more mobile, and the Sunday in between is the quiet before it.
You do not survive that shape by reacting to it. Autoscaling is real but it is not instant, and a cold node that takes two minutes to become useful is worthless against a spike that arrives in fifteen seconds when an email campaign sends. So the actual playbook is the opposite of elastic:
- 1
Pre-warm to the forecast, not the average
A week out, every tenant's expected peak gets a number, and the pool is pre-scaled to the aggregate with headroom on top. You pay for a few over-provisioned days on purpose. Peak is not the time to find out whether scaling works.
- 2
Freeze everything that can change
A hard change freeze across the platform from days before to days after. No deploys, no config edits, no clever last-minute optimisations. The most dangerous thing on Black Friday is a well-meaning engineer.
- 3
Protect the checkout above all else
Under real stress you shed load from the least critical paths first: recommendations, non-essential personalisation, heavy search facets. The cart and the checkout get defended to the last CPU. A slow homepage loses a visit. A failed checkout loses the sale and the trust.
- 4
Isolate the noisy tenant
Per tenant rate shaping and quotas mean one retailer's viral moment, or one retailer's bad bot traffic, cannot starve the pool. This is the multi tenant tax you pay all year so that the shared model is safe on the one day it is tested.
- 5
Watch, do not touch
A war room, dashboards per tenant, and the discipline to let the system do its job. The best Black Fridays are boring. You staffed up to watch a graph stay flat, and that is the win.
Taxation is a distributed systems problem wearing a suit
You would think tax is a solved, boring field, a lookup table and a multiply. Then you ship commerce across borders and discover it is one of the hardest things in the platform. Tax is per jurisdiction, and jurisdictions nest and overlap and disagree. It changes by product category, so a chocolate bar and a chocolate-covered biscuit can be taxed differently and a court has genuinely decided a case on it. It changes by customer type, business or consumer, and by whether the price the customer saw already included it, which is a cultural expectation, not a technical one, and differs by country.
The architecture lesson is that tax has to be computed at the last possible moment, authoritatively, on the server, as part of the same transaction as the order, and it must be fast enough to sit in the checkout path on the busiest day of the year. You cannot cache it, you cannot estimate it, and you cannot get it slightly wrong, because slightly wrong at scale is a regulatory event. In a multi tenant world it also has to be configured per tenant without any tenant being able to see or affect another’s rules. It is the least glamorous and most unforgiving surface in the whole system.
Product categories are the data model, and the data model is the business
A product catalogue looks like a tree and behaves like a graph. A dress belongs in Women, in Summer, in Sale, in New In, in a brand page, and in whatever hand-curated edit the merchandising team dreamed up this morning. The same physical product is a dozen different products depending on the colour and size the customer actually wants, each with its own stock and sometimes its own price. Categories are not navigation, they are the business logic of merchandising, and the moment you model them as a simple tree you have quietly limited what the commercial team is allowed to do.
The thing that makes this hard at platform scale is that every tenant models their catalogue differently, and all of them are right, because a grocer and a fashion house and an industrial parts supplier do not share a mental model of what a product even is. A multi tenant commerce platform lives or dies on whether its product data model is flexible enough to be all of those at once while still being fast enough to render a category page with ten thousand items and forty filters under load. Composable, API-first platforms exist largely because this one problem defeated the generation of monoliths before them.
Customer support is a load-bearing part of the architecture
Engineers file support under not-my-problem, and then build systems that make support impossible, which makes it their problem at the worst possible time. When a customer’s order is stuck on Black Friday, the support agent needs to see the true state of that order, the payment, the inventory reservation and the fulfilment, right now, for a single order out of millions, without running a query that threatens the checkout everyone else is using.
That is an architectural requirement, not a nice-to-have. It means order state has to be observable and queryable on a path that is isolated from the hot transactional path. It means every state transition an order can make has to be legible to a human who is not an engineer, under pressure, on the phone. The platforms that treat support tooling as a first-class read model, separate from but consistent with the system of record, are the ones where Black Friday does not turn into a second disaster in the support queue a day later.
Attention is the scarcest resource, and you cannot buy more of it
All of this, the elastic pool, the pre-warming, the tax engine, the catalogue graph, exists to serve a few hundred milliseconds of human attention that is leaving whether you earn it or not. In e-commerce the brutal fact is that the customer did not come to admire your architecture. They came with a half-formed intent and the patience of a goldfish, and every single thing you do slowly is a reason for them to abandon the cart and go back to the feed they came from.
This is why performance is not a nerd’s vanity metric in commerce, it is revenue, measured directly. A page that is a second slower converts measurably worse, and on peak day that second is multiplied by every visitor you spent marketing money to acquire. The whole discipline of the work I have described, consolidating stacks, defending the checkout, shaving the critical path, is in service of not squandering the attention that was already the hardest and most expensive thing to get. You spend millions getting someone to the page. The architecture exists so you do not lose them in the last two seconds.
Moving 156 customers without anyone noticing
The migration itself is the part people find hard to believe, so here is the shape of it. You do not big-bang 156 production commerce sites. You build the multi tenant platform alongside the old one, you make the two run in parallel behind a routing layer, and you move tenants across in waves, smallest and most forgiving first, watching each wave bed in before you start the next. Every tenant has a tested, rehearsed path back to their old stack until the moment you are certain, and not a minute before.
The one-cutover framing is true at the level that matters, a single coordinated program that ended with everyone on the new platform and the old one dark, but inside it was dozens of small, boring, reversible steps, each one dull by design. Boring is the highest compliment you can pay a migration. The exciting ones are the ones that end up in the incident review. We timed the final waves well clear of peak season, because the only thing dumber than migrating during Black Friday is migrating during Black Friday, and by the time peak came the new platform was the only platform, and it held.