02IdempotencyArticle →
Retry storm
The phone lost signal and retried. The customer bought one ticket.
tap to buy
Buy one ticket. The signal is bad.
Every way a payment system loses money, as a game you can break and an article that shows the real fix.
A $100 balance. Fire payments at it faster than it can count.
The phone lost signal and retried. The customer bought one ticket.
Add 10¢ a thousand times in floating point. Count how often the total is wrong.
The button was disabled in the UI. The API was not.
Two UPDATEs. The server dies between them.
Providers deliver events late, twice and out of order. You pick the order.
$100 three ways. Where does the last cent go?
The payout job was slow, so someone ran a second copy.
The real versions hit a real database.
Same bugs, run against Postgres with real transactions, real locks and the SQL on screen.