Charged twice
The reply never arrived. Did the money move, and what should the client do?
Twelve payments go out over a network that loses some requests and some replies. The client cannot tell a lost request from a lost reply, so it must decide what silence means. Each tab is one answer. Watch the amount charged drift above the amount owed.
Preparing for interviews? The ten-week plan puts this in order with DSA and the design rounds.
Included with a plan
This lab is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.
See plansAlready a member? Sign in
Or start free: a free account opens lessons 2 and 3 of every track.
the lesson Charged Twice (idempotency & exactly-once)
The whole idea this lab came from, told start to finish.
on the path Module 2 of 32 in System Design: When the stalls must agree
The lessons, boards and videos around this lab, in reading order.
see also The Google File System, Kafka: a Distributed Messaging System for Log Processing, End-to-End Arguments in System Design, The Chubby lock service for loosely-coupled distributed systems and Conflict-free Replicated Data Types in Papers.