Idempotency key
A unique ID sent with a request, so that repeating it has no extra effect. It's how a retry avoids charging a card twice.
See it in action
These lessons put idempotency key to work. Read one, then play it and watch what happens without it.
- Take the money: A sale brings 4,000 req/s, and 4% are people paying: 160 charges a second at the peak. Your app calls the payment…
- When retries make it worse: 9,000 req/s on five servers. One server crashes, and the four left are a little short. That should cost you about one…
- Ticket sale: one show, everyone at once: Tickets for the year's biggest tour go on sale at 10:00. 50,000 req/s arrive in the first minute, for 60,000 seats.…
- Payouts: every cent accounted for: A marketplace that pays its sellers: 2,000 req/s, and 4% are payments, 80 a second, charged by the Payment API while…