Grokking Redis
Vote

0% completed

​

4.9 Idempotency Keys and Deduplication

A client sends a payment request, the server charges the card, and the response is lost to a timeout. The client cannot tell whether the charge happened, so it retries, and without protection the customer is charged twice. Networks, load balancers, message brokers and impatient users all produce duplicate requests like this one.

A distributed system can deliver a message at most once, which risks losing it, or at least once, which risks duplicates; exactly-once delivery is not achievable. What you can build is exactly-once effects: duplicates arrive, but the state changes only once

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content