idempotency-lab

Retries charge cards twice

200 customers pay through a network that loses some requests, loses some replies and occasionally runs slower than the client's timeout. Every client retries. The left server charges for every request it receives. The right one runs the Idempotency-Key middleware from this repo. Same seed, same network.

One customer, both servers


        

      

Send it yourself

POSTs to an in-tab /charges that takes 600ms, through the same planRequest() the node:http middleware runs. Try sending twice at once, then resending, then changing the amount under the same key.

No requests yet.