Every senior engineer has watched both failures. One team builds for a scale it will never see and spends two years paying interest on a sharding layer, a service mesh and a Kafka cluster with one consumer. Another team ships the obvious design, grows faster than anyone planned, and spends a year rebuilding the aircraft in flight. The fix for both is not "it depends". It is a specific horizon — design to absorb the next 10×, leave seams for the 100× after it, ignore 1000× — plus a clear sense of which components break at each step, what is cheap now but ruinous later, and when to start the next redesign so it finishes before you need it.
The argument for 10× is arithmetic before it is taste. Time to a factor F at annual growth g is ln(F)/ln(g). At 2× a year, a very good year for most products, 10× arrives in 3.3 years, 100× in 6.6, 1000× in ten. At 3× — hypergrowth — the numbers are 2.1, 4.2 and 6.3. Put those against how long a design actually lives before the product, the team or the economics change underneath it. In most organisations that is three to five years. So 10× is inside the life of the thing you are drawing: under-design for it and you will personally do the rewrite. 100× is at or beyond its end: whoever meets it will be working with different requirements, different people and different prices for compute and storage. Designing for 1000× is designing for a system you cannot describe.
years = ln(factor) ÷ ln(growth). At 2×/yr or faster, 10× lands inside the life of the design you are drawing today and 100× at or beyond its end; at 1.5×/yr even 10× is a next-design problem; 1000× belongs to a different team, a different product mix and probably different hardware prices.
The second argument is about shape. Load at 1000× is not today's load with the numbers multiplied. The read/write mix changes, the biggest tenant ends up with a different share of traffic, a batch feature becomes interactive, an API partner turns up sending 40% of calls. The dimension you scaled for is rarely the one that grows. A design sized for 1000× requests per second tends to be the wrong design when the real 1000× turns out to be data at rest or number of tenants, and you have paid for scale on an axis nobody used.
So the first move is to stop asking "will it scale?" and name the dimensions separately: request rate, write rate, data at rest, tenant count, the size of the largest tenant, fan-out per request, number of engineers committing to the codebase, number of regions. They grow at different rates, and they grow differently from each other. Data at rest is the integral of write rate, so it grows through a flat traffic year. In B2B the largest tenant usually grows faster than the median. Headcount often grows faster than traffic in the year after a funding round. Each dimension gets its own 10× question.
Architect's note
The things that break at each step have a pattern. They are almost never the hot request path, because that is what everyone load-tests, caches and profiles. They are the O(N) assumptions hidden where nobody measures: the admin page that lists every tenant, the nightly job that loops over all accounts, the migration that rewrites a table, the health check that fans out to every shard, the report that joins against the full events table. At the size where they were written N was small, so they were correct. Growth makes them wrong one order of magnitude at a time.
The failure mode is sharper than "gets slower". A job whose duration is proportional to N but whose schedule is fixed has a crossover date: the day duration exceeds period. Before it, nothing is visible. After it, either runs overlap (two copies competing for the same rows, each slower because of the other, so the overlap compounds) or a lock skips runs and the work silently falls behind. A job that took 20 minutes of an hourly slot at 1× hits the crossover at 3×, well inside the first order of magnitude. The same shape applies to anything periodic over the whole population: billing runs, retention sweeps, cache warmers, "reconcile all accounts". Find them by listing every scheduled job and dividing its p95 duration by its period. Anything above 0.1 will cross over inside the next 10×.
Request path
Whole-dataset operations
Coordination & fan-out
People & process
N+1 queries and missing indexes surface; unbounded list endpoints return 40k rows to one customer
pg_dump no longer fits the nightly window; ALTER TABLE holds a lock long enough to page someone
pods × pool size exceeds max_connections; a cron that loops over all tenants overruns its own period
one deploy queue becomes the bottleneck; migrations need a reviewer who understands locking
single writer saturates on CPU or WAL throughput; cache stampedes on hot keys after deploys
restore time exceeds RTO; a backfill becomes a multi-week project with its own on-call
retry storms and fan-out tail amplification dominate p99; the largest tenant is its own capacity plan
no one person holds the whole system; on-call needs runbooks, not heroes
one region, one control plane, one blast radius; the product needs cells
online resharding and cross-shard queries are routine work, not incidents
global metadata / leader-based coordination becomes the new single writer
a platform team exists or the product teams each rebuild it badly
The highlighted column is the one teams under-plan: operations whose duration is proportional to total data, not to traffic. Data at rest is the integral of write rate over time, so it keeps growing through a flat traffic year.
Read the ladder by row, not by column. At ×10 the failures are embarrassing but local: a missing index, an unbounded endpoint, a connection pool sized as if the fleet would never grow (pods × pool size is a product, and autoscaling grows the first term without anyone touching the second). At ×100 they become structural: the single writer, the restore that no longer fits the RTO, the tenant who is now a capacity plan all by themselves. At ×1000 they are about blast radius and coordination: one region, one control plane, one metadata service that everything asks before doing anything. Cells, sharding and a platform team show up at this rung, which is exactly why they are premature two rungs earlier.
The last column matters as much as the others. A design that works for 12 engineers — a shared schema, a single deploy pipeline, "ask the one person who understands the billing tables" — breaks at 120 engineers for reasons that have nothing to do with throughput. When Microservices Are the Wrong Choice covers what to do about that without distributing the monolith. The point here is to put the org dimension on the same 10× clock as the traffic, because it usually runs faster.
Finding the rungs before growth does takes a different test from the one most teams run. A conventional load test replays 3× peak QPS against today's dataset, which exercises the column everyone already watches and none of the others. The test that finds the ×10 breakages is today's traffic against 10× the data and 10× the largest tenant. Build it by cloning real tenants with remapped IDs, not by generating uniform synthetic rows, because uniform data has no skew and skew is where the surprises are. Then run the whole operational calendar against it, not just the request mix: the nightly jobs, a restore, a replica rebuild, one representative migration, the admin pages, the export. On a mid-sized system the environment costs an illustrative few thousand dollars for a week of compute and storage. The first run usually turns up two or three crossovers nobody had on a list, and each one is cheaper to find there than at 3 a.m.
Two cheaper probes cover most of the same ground between full runs. Run EXPLAIN for the top queries by total time against a copy whose statistics reflect 10× the rows (the 10× environment above, or row-count hints where your planner accepts them). Plans that flip from index scan to sequential scan, or from hash join to nested loop, when estimates grow are the ×10 query failures. Then inventory every code path whose cost is proportional to a count rather than to a request: loops over tenants, SELECT COUNT(*) on a dashboard, fan-out to every shard or partition, a cache warm-up that reads everything. That list is short, usually a few dozen items, and it is most of the ladder's first row.
The most under-planned scaling limit is the time it takes to do something to the whole dataset: restore it, reindex it, backfill a column, re-encrypt it, rebuild a replica, migrate it to a new schema. These run at bytes-per-second throughput limited by disk, network and how hard you dare to load the primary. Their duration is linear in data at rest and independent of traffic. Request latency has flat curves you can buy your way along. These do not.
At 1 TB every line is a maintenance-window chore. At 10 TB a physical restore alone is ~5.5 h and a throttled backfill is ~23 days. At 100 TB the same backfill is ~8 months: the migration you would have done in a sprint now needs a dual-write design and a quarter.
The consequences arrive in a predictable order. First the backup window: a logical dump that took half an hour at 100 GB takes five and a half hours at 1 TB. Then the RTO: a restore that is a tidy 33 minutes at 1 TB is five and a half hours at 10 TB, before WAL replay, cache warm-up and the replica rebuilds you need to be safe again. Your written RTO has been fiction since some point last year, and nobody re-ran the drill. Then schema change: a column backfill throttled to protect production becomes a multi-week job. It needs dual-write code, a progress table, a kill switch and someone watching replica lag. At that point it has stopped being a migration and become a project.
GitHub's October 2018 incident is the canonical public example. A 43-second loss of connectivity between the US East Coast network hub and the primary US East Coast data centre triggered a cross-country database failover, and then just over 24 hours of degraded service. A large share of that time went into restoring and re-replicating multiple terabytes of MySQL data. The partition was the trigger. Data size is what set the duration. Almost every long outage has the same shape: a short fault, then a recovery that has to be paid for in bytes.
Two details make the real number worse than the chart. First, restore is not the whole RTO. Point-in-time recovery is base backup + log replay + warm-up, and the replay term scales with write rate × time since the last base backup, not with data at rest. In PostgreSQL, WAL replay runs in a single startup process, so it does not get faster with a bigger box. Illustratively: 200 GB of WAL a day with weekly base backups means up to 1.4 TB to replay, which at 100 MB/s of single-threaded apply is roughly four hours stacked on top of the restore. The same single-threaded apply is why a streaming replica starts lagging permanently once primary write volume passes what one replay process can apply, a ×100 wall that no read-scaling plan mentions. Second, snapshot restores lie about being done. A cloud block-storage snapshot (EBS, for instance) comes back in minutes, but its blocks are fetched lazily from object storage on first read, so the "restored" database runs its first hours at a fraction of normal I/O. That is fine for a drill that only checks the restore succeeded, and not fine at peak traffic. Measure time to serve production p99, not time to pg_ctl start.
The less obvious cost is redundancy. Rebuilding a lost replica copies the whole dataset, so the window during which you are one failure from data loss grows linearly with data. At 1 TB it lasts under an hour. At 30 TB, rebuilding from a primary you are throttling to protect production can take most of a day, with each rebuild adding load to the node you can least afford to lose. That is the real argument for small restorable units (per-shard, per-tenant, per-time-partition): they cap the exposure window rather than just the recovery time.
~5.5 h
10 TB restore @ 500 MB/s
~23 d
10 TB backfill @ 5k rows/s
×10
data ⇒ ×10 every one of those
0
traffic in any of those formulas
Pitfall · the RTO nobody re-measured
Capacity planning by linear extrapolation fails because the curves that matter bend. Two account for most of the surprise. The first is queueing. For a single queue with random arrivals, time in system grows as 1/(1−ρ). At 50% utilisation requests spend twice their service time in the system, at 80% five times, at 90% ten times. A service that has been "fine at 60% CPU" for a year does not degrade gracefully as growth takes it to 85%. It turns into a latency incident, then autoscaling lag makes it worse, then retries push ρ past 1. Real systems are not M/M/1, but the knee is real, and it is why "80% is the ceiling" is a queueing statement, not superstition.
The second is fan-out tail amplification, the argument in Dean and Barroso's The Tail at Scale. If each backend exceeds its p99 1% of the time independently, a request touching N backends sees at least one slow response with probability 1−0.99ᴺ: 10% at N=10, 39% at N=50, 63% at N=100. Growth increases N without anyone deciding to. More shards means a scatter-gather query touches more of them, more partitions means more brokers per batch, more services means more hops. At ×100 your backend p99 has quietly become your median user experience.
Neither curve is linear, so neither is visible in a linear extrapolation of last quarter's dashboard. Growth pushes a component along A (same fleet, more load) and a request along B (more shards, more partitions, more microservices per call) at the same time.
Three other non-linear effects are worth naming because they show up in postmortems. Connection count is multiplicative: instances × workers × pool size against a database that degrades long before its hard connection limit. That is why a pooler is a ×10 fix and not a ×1000 one. Coordination cost in anything all-to-all (gossip, full-mesh health checks, cache invalidation broadcasts) grows as N². Skew grows faster than volume. If tenant size is roughly Pareto with tail index α, the largest of n tenants grows like n1/α. At an illustrative α ≈ 1.2, 10× more tenants means a largest tenant about 7× bigger, so the whale grows almost as fast as the whole business while the median does not move. A hash-partitioned design meets that customer as one hot key that no amount of added shards relieves. The whale problem is not bad luck. It is what heavy tails do as the sample grows, and it means per-tenant limits and a way to move one tenant are ×10 work, not ×100 work.
Composite scenario · labelled as such
The build-now question is usually framed as scalable versus simple. That is the wrong axis. The useful axes are cost to carry today (complexity, operational load, cognitive tax on every engineer, every day) and cost to retrofit later. The second is dominated by one question: does the retrofit cost grow with data? Anything that means rewriting every row, re-keying every reference or changing a contract that clients have already coded against gets more expensive every month you wait. Anything that just adds a component in front of or beside the existing system costs about the same next year as it does today.
Build now
cheap today · superlinear in data later
Seam now, build later
expensive both ways · pay for the joint, not the system
Just do it when needed
cheap both ways
Defer, deliberately
expensive to carry · cheap to add later
cost to carry now →
The top-left quadrant is where the cheap wins are, and senior teams still skip them because each looks too small to matter. A tenant or partition key leading every primary key costs one column and some discipline. Retrofitting it at 10 TB means touching every table, every index and every query. ID width is the classic case. A 32-bit auto-increment key runs out at about 2.1 billion. Basecamp publicly described a multi-hour read-only period in November 2018 when one table's integer key hit that limit, and widening a key column on a large, hot table is exactly the whole-dataset operation from 8.3. IDs generated without a central sequence (Twitter published its Snowflake scheme in 2010 for this reason) also remove a single writer you would otherwise have to shard later. Hard page-size caps and cursor pagination belong here too. You can always raise a limit, but you cannot add one to a public endpoint that has returned unbounded lists for three years without breaking someone.
The bottom-right quadrant is where over-engineering lives. Every item there is expensive to run and cheap to add once there is a reason: a streaming platform with one consumer, microservices split for scale rather than for team autonomy, active-active multi-region with no availability or regulatory mandate behind it. When Postgres Is Enough makes the detailed case for the database. The general rule is that if adding something later is a deployment, not a data migration, you should add it later.
It is worth doing the arithmetic once, because it shows which way intuition misleads. Take one decision, sharding the primary store, with illustrative but not unusual numbers. Strategy A shards now: about six engineer-months to build, then a carry cost of roughly 0.75 engineer-months a month. That carry is not the on-call for the shard fleet alone. Every feature that needs a cross-tenant query, every migration run N times, every report that now needs a scatter-gather pays it. Strategy B builds the seam now (tenant key everywhere, a one-row shard directory, one canary tenant on a second target), at about half an engineer-month plus 0.1 a month to keep it exercised, and builds the machinery behind it, around eight engineer-months, when the dimension crosses its threshold. Strategy C defers entirely, and when the threshold arrives it pays for the re-keying too: about twenty engineer-months, because every table, index and query changes and the backfills are the whole-dataset operations from 8.3.
Over 36 months, with the threshold crossed at month 24, A costs about 33 engineer-months, C about 29 and B about 20. Now weight by the uncertainty that actually exists at decision time. If there is a 50% chance the dimension never crosses inside the window (the product mix changes, the big customer churns, growth slows), the expected costs become roughly 33 for A (it pays the carry either way), 14.5 for C and 12 for B. Two conclusions survive any reasonable change to the numbers. Building the machinery early is the worst option unless the probability of needing it is close to one and the date is close. And the seam beats outright deferral only because the retrofit is superlinear in data. If the retrofit cost were flat, C would win, which is exactly the bottom-right quadrant. The break-even is simple to write down: the seam pays when P(need) × (retrofit without seam − build behind seam) > seam carry over the horizon. With these numbers that is 0.5 × 12 = 6 against about 4, a narrow win. It turns negative if nobody keeps the seam exercised and the 0.1 a month quietly becomes a rebuild later.
Composite scenario · how over-building fails
Architect's note · the top-right quadrant
A seam, in Feathers' sense, is a place where the system can be cut and re-joined without either side noticing. Seams turn "rewrite for 100×" from a migration of everything into a change behind an interface. Five pay for themselves most reliably: routing, data ownership, identity, contract and change stream. The Distributed Systems Deep Dive covers the outbox mechanics. Databases from the Inside covers what sharding does to your queries.
Seam
What it looks like today
What it makes cheap later
How you keep it honest
every request resolves tenant → cell/shard via a lookup, even with one target
move a whale to its own shard; split cells; region pinning
put an internal tenant on a second target in prod
each table has one owning module; others go through its interface
extract a service or a database without a join archaeology project
a lint/ArchUnit rule that fails CI on cross-module SQL
opaque 64-bit IDs, generated without a central sequence
merge shards, move rows, go multi-writer without re-keying
IDs generated app-side from day one; never parse them
cursor pagination, capped page sizes, async-capable responses
change the storage or the processing model behind a stable API
clients already handle 202 and next_cursor in tests
outbox rows written in the same transaction as state
add consumers, indexes, caches, a warehouse feed without touching writers
at least one real consumer reads it in production
The column that matters is the last one. An unexercised seam is fake optionality. A shard directory with one entry that no code path has ever resolved to a second target does not work. It is a lookup table plus an assumption. The first time you use it, at 2 a.m. while moving a whale, you find the twelve places that bypassed it: a reporting query with a hard-coded connection string, a cron job that reads the primary directly, a cache key that leaves out the shard. A seam stays honest only if something uses it in production: an internal tenant on a second shard, a second cell carrying synthetic traffic, one real consumer on the change stream, a CI rule that fails on a cross-module join. The running cost is small but not zero, and it is the real price of the option.
The decay has a rate, and it scales with the number of people who can write a new code path. A bypass is not a mistake anyone makes on purpose. It is the shortest route for a new engineer who has never seen the seam used, so the rate is roughly proportional to new data-touching code paths per month × the fraction of engineers who do not know the seam exists. That fraction rises with headcount and turnover. On the unexercised lane each bypass costs nothing when it is written and a few hours to a day of incident time when the seam is first used for real, all of it at the worst possible moment. On the exercised lane the same bypass costs one failed CI run or a canary alert in the week it was written. The canary tenant is doing more work than it looks: it is a continuously running proof that the second target works, and every week it stays green the option keeps its value.
Seams also have a failure mode in the other direction. Past a handful, they turn into an abstraction layer that nobody can see through. Every repository wrapped in an interface "in case we change databases", every call hidden behind a message bus "in case we need async". That is indirection without a named future change, and it makes today's debugging worse in return for a flexibility nobody will use. The test is concrete: for each seam, name the specific change at 100× that it makes cheap. If you cannot name one, remove the seam.
The most common scaling failure among competent teams is starting too late, not designing badly. The usual trigger is a utilisation alert at 80%. But redesigns have lead times: design, build, migrate, soak, cut over. Growth keeps running the whole time. If the new design takes L months and load grows by a factor of g per year, you have to start while load is at most margin ÷ g^(L/12) of the ceiling. With 2.5× annual growth, a nine-month project and an 80% safety margin, that is about 40% of the ceiling. At that point the dashboard is green, nobody is worried, and the roadmap is full of features. A team that waits for the 80% alert finishes about six months after it has passed the ceiling. It spends those months shedding load, over-provisioning and cancelling the redesign's own milestones to fight fires.
So capacity triggers should be written as start dates, not alarm levels. For each dimension, record the current ceiling, the measured growth rate, the honest lead time for the next design (take your estimate and apply the ratio of your last two estimates to their actual durations), and the threshold that follows from them. Signals That an Architecture Has Run Its Course covers the qualitative signals: change-failure rate, lead time on cross-cutting change. This is the quantitative counterpart, and it goes in the same review.
Q1 · Is a regulatory or contractual constraint forcing isolation (residency, per-tenant isolation, sovereign region)?
yes
Build now
Cells or regions are a requirement, not a scaling bet. Price them into the product.
no
Q2 · Will this dimension plausibly hit 10× inside (redesign lead time + one planning cycle)?
yes
Q3 · Does the current design reach 10× with vertical scale, replicas, tuning?
yes
Keep it
Write down the start threshold and the owner.
no
Build the 10× design
…and a seam for 100×, not the 100× system.
no
Q4 · Is retrofit cost superlinear in data (re-keying, ID width, tenancy column)?
yes
Build the cheap part now
It costs a column today and a quarter later.
no
Defer
Record the trigger metric; revisit on schedule.
Context moves every threshold in that tree. Stage: before product-market fit, optimise for speed of change and accept a rewrite at 10×, because the more likely failure is that the 10× never arrives. Keep only the top-left cheap wins. Team size: a team of eight cannot operate the top-right machinery even if it builds it, and whatever it cannot operate reduces availability instead of adding capacity. Growth predictability: contracted enterprise onboarding gives you dates, while consumer virality gives you a distribution with a fat right tail. The second justifies more seams, not more machinery. Regulation is the one context where building ahead is often correct. Data-residency and per-tenant isolation requirements force cells or regions for reasons unrelated to scale, and bolting residency onto a single global database is the worst kind of retrofit, because every row has to be moved and its location proven. When the mandate exists, build it and price it in.
Design horizon
Build now
Seams
Rewrite at 10×?
Start lead
3×–10×, 12–18 mo
top-left cheap wins only
tenant key, IDs; nothing else
acceptable: likely cheaper than guessing
1 quarter
10× per dimension
cheap wins + 10× design where Q3 fails
all five, each exercised
no: you will do it mid-growth
2–3 quarters
10× of the fastest dimension only
whatever cuts cost per unit
existing ones; retire unused
rare; migrate incrementally
3–4 quarters
the mandate, then 10×
cells / regions / isolation
routing + data ownership first
no: residency retrofit moves every row
contract date − 2 quarters
Lead times are the honest ones, after correcting your estimate by the ratio of your last two estimates to their actuals. Headcount bands are a proxy for how much machinery a team can operate, not a rule.
Where the conventional advice is wrong
"Premature optimisation is the root of all evil." The full Knuth line is about small efficiencies in code, and it was never about data layout. Tenant keys, ID width and pagination contracts are not optimisations. They are the parts of a design whose retrofit cost grows every month, and deferring them is not restraint, it is borrowing at a variable rate.
"Stateless services scale horizontally, so we are fine." They do, which is why they are never the bottleneck. The state behind them is. A design review that spends its time on the stateless tier has reviewed the part that was never going to break.
"Alert at 80% utilisation." As an operational alarm, fine. As a planning trigger it is, by construction, one full lead time late. A redesign started at 80% finishes at 80% × g^(L/12), which passes the ceiling whenever g^(L/12) > 1.25. For a nine-month project that means any growth rate above about 1.35× a year. Planning thresholds are derived from growth and lead time, and they usually sit well below the alert.
"Load test at 3× peak." A useful test that answers the question nobody was worried about. The failures that end careers are in the data-proportional column, and a QPS test against today's dataset cannot see them.
Questions to ask in a design review
10×
design to absorb it
100×
leave a seam for it
~40%
start threshold at 2.5×/yr, 9-mo lead
1000×
someone else's problem
Wrapping up · Architecture Judgement