33. Idempotency Keys
Any request can time out after the server has already acted. The client cannot tell that from a request that never arrived, and the only safe response to uncertainty is to retry — which, without help, charges the card twice.
Start with a template. Work through each step. Ask Coach when you need a second opinion.
Company tags are community-reported. Counts on cards show how many people reported that design.
Any request can time out after the server has already acted. The client cannot tell that from a request that never arrived, and the only safe response to uncertainty is to retry — which, without help, charges the card twice.
The classes and code behind the ad click aggregator: signed click tokens, a redirect that never waits on the log, and a stream counter that de-duplicates and handles late clicks. Tests run all of it.
Run 10,000 jobs a second within two seconds of their time, at least once, with retries, fairness between tenants and exactly-once effects.
Charge cards through the networks exactly once: idempotency keys, a card vault, timeouts as unknowns, signed webhooks, a double-entry ledger and reconciliation. One-hour boards for junior, senior and staff, with the theory behind them.
An order checkout across payment, inventory and shipping, run as a saga.
Accept in milliseconds, work in the background: leases and heartbeats, retries and dead letters, progress by SSE and webhooks, fairness across tenants.
Ten charities, three days, $100 M: charge through a third-party processor exactly once, queue the broadcast spikes, keep live totals on sharded counters. One-hour boards for junior, senior and staff, with the theory behind them.