Ten Bounds on Failure: Resilient Payment Systems at Shopify
At volume, one-in-a-million payment failures happen constantly, and a timeout can't tell success from failure.
Grouped by the crux: the bottleneck that made each system hard. Filter by company to see who else hit the same problem.
Showing 41 of 41 breakdowns across 14 problems.
A request times out or fails partway. The caller cannot tell whether it already took effect, so a retry may repeat an operation that succeeded.
At volume, one-in-a-million payment failures happen constantly, and a timeout can't tell success from failure.
A timed-out client can't tell if the work happened, and retrying risks doing it twice.
A timed-out payment call may have moved money, so retrying must never move it twice.
Clients that miss the response re-send events the server has already processed.
A timed-out request leaves the client unable to tell whether it already happened.
A queue stops absorbing work at the moment the backlog it exists for arrives. Either the queue's own storage gets slower as it fills, or the way jobs are taken out lets one stuck job block the rest.
Kafka's per-partition ordering lets one stuck message stall every message behind it.
The queue's own storage slows down as the backlog it must absorb grows.
Under peak bursts RabbitMQ throttled its publishers, and the slowdown cascaded upstream.
Hundreds of destinations fail daily, and a shared queue makes every failure everyone's backlog.
A full Redis queue couldn't dequeue, because draining required the memory the backlog had consumed.
Under overload, the system drops requests without looking at how important they are. The shedding that is meant to protect the service also throws away its most critical traffic.
Priority-blind shedding drops rides at the same rate as batch jobs, protecting nothing that matters.
One concurrency limiter shed traffic blind to priority, dropping critical playback with everything else.
The shedder protecting members dropped member requests as readily as batch jobs.
An overloaded server that drops its health checks convinces the fleet it's dead.
Undifferentiated dropping would sacrifice charge creation to keep test traffic alive under overload.
One database cluster holds everything, and that causes two problems. It can only grow by moving to bigger machines, and any incident on it hurts everything built on top. The way out is to move whole tables or data domains onto separate clusters.
Every write went to one 96-vCPU primary, and there was no larger machine.
A decade of code assumed one shared database, and the real ceiling was the cluster.
GFS hit its metadata ceiling, so Colossus rebuilt the metadata service on Bigtable.
Slack's biggest customers outgrew the largest shard a single host could sustain.
One monolithic database carried a third of all writes, and growth would overwhelm it within months.
One table grows too large, or takes too many writes, for any single database server. Moving whole tables to other servers no longer helps, because a table is the smallest piece that can be moved. The table itself has to be split across shards.
The biggest tables outgrew any single instance, and vertical partitioning can't split a table.
Canva's media tables hit every MySQL ceiling at once: migrations, filesystem, replication.
The block table's writes outgrew the instance: VACUUM stalled, transaction-ID wraparound loomed.
The pins table outgrew any one machine, and every clustered alternative broke first.
In one large shared cluster, a single failure costs more as the cluster grows. One slow or dead node degrades an outsized share of operations, and coordination overhead gets worse with size. The fix is smaller, isolated cells.
One slow node failed ~40% of indexing batches: blast radius scaled with cluster size.
When all customers share the same machines, one bad request can take down the whole service.
Every new shard was a new way to take the whole platform down.
The failure is partial and inconsistent, so different components disagree about what is healthy. Automated detection cannot settle on a fault that the system itself cannot agree exists. Mitigation falls to a human working from unclear evidence.
Gray failure in one zone defeated automatic detection: the components disagreed on what was actually down.
A faulty chip computes wrong answers and leaves no trace in any log.
A switch failed partially, and every failover built for clean up-or-down deaths misfired.
The monitoring system shared its fate with the same infrastructure it watched.
When your monitoring runs on the platform it watches, an outage blinds you too.
The monitoring depended on the failing Consul cluster, so responders diagnosed a 73-hour outage nearly blind.
A process with several steps is interrupted partway through. Some of the work is done and some is not, and there is no safe way to resume: you either skip work or do it twice. At scale, you often cannot even list which steps are left.
A multi-step process crashing between steps leaves its outcome, and its side effects, to chance.
Every service rebuilds the same crash-safe machinery, and the duplicated plumbing is what does not scale.
Half-done multi-day processes lived inside pub/sub code, so nobody could answer what remained.
The failure continues after its trigger is gone, because the degraded state keeps itself going. The system cannot recover on its own. Something outside has to shed load below the tipping point or add capacity.
Slack paused the trigger early, but by then the failure was sustaining itself.
A failure spreads through the interactions between components, but each defense measures and acts inside one component only. Every defense can behave correctly while the failure moves between them. Containing it takes an action that no single defense can make.
Failures spread through service interactions; every defense could see and act on one service.
The system must decide where data lives (device, tier, region, replication level) before it can see how the data will be used. The evidence that would justify the choice arrives only after the choice is made.
Where a file should live depends on how it will be used, not yet known.
A dependency is failing because it is overloaded. Each client retries to improve its own odds, and those retries use up the capacity the dependency has left, so load multiplies at the worst moment. Plain backoff does not fix it, because clients that failed together retry together.
Retries amplify overload by consuming the server's scarce capacity, and backoff alone cannot stop it.
The networking relied on a setting saved nowhere. The Kubernetes upgrade deleted the label it needed.