SD-47 · WIRE TRANSFER API · INTERACTIVEBreak it.
Break it.
Then fix it.
Push payroll-sized bursts at a wire transfer API and watch what breaks: threads stuck on the payment network, retries that send money twice, one hot ledger row. Every switch is a decision you would defend in an interview.
CHALLENGETake 5K transfers/s with p99 under 300 ms, no duplicates and a reconciled ledger.
StatusDOWNAt 1K transfers per second
p99 to 2022,000+ msTarget under 300 ms
Duplicate sends0 / dayRetries return the same transfer
Errors50%Transfers being refused
Monthly cost$3,120One ledger database
ClientsLIVE
1.0K transfers/s · retries on timeouttraffic source
Load balancerOK
Autoscales transfer serversspreading 1.0K/s
Transfer servers × 12DOWN
Waits 2 s on the network1.0K / 600 transfers/s
Payment networkEXTERNAL
2 s per messageexternal
Clearing account rowDOWN
Every transfer credits it1.0K / 500 updates/s
Ledger DBDOWN
6 writes per transfer6.0K / 4.0K writes/s
Every request waits 2 s on the payment network. Each thread is stuck for the whole network call, so a server takes only 50 transfers a second and p99 is over 2 s. Worse, a crash after the debit and before the send leaves money held but never sent. Write the transfer and an outbox row in one transaction, answer 202, and let a sender deliver it.
2 sA network round tripToo long to hold a request thread; send from an outbox instead.
0.2%Requests retriedWithout an idempotency key, each retry is a second wire.
6Writes per transferKey, transfer, 2 entries, hold and outbox row, in one transaction.
0Unexplained breaksEvery entry is matched with the network’s statement each day.
Want the reasoning behind every switch?Visual walkthroughFull write-up
Was this lab useful?Your vote tells us what to improve next.