1 Comment
⭠ Return to thread

So, since they use in-memory db for idempotency keys, how can it handle machine failure? So, let's say user sent request for payment of amount x to server A, which generated the idempotency key B in in-memory db after the actual processing was done i.e. amount got debited from user's account and this transaction was saved in ACID database but while communicating thos response to user, there was a network failure and the machine became unreachable, so customer got 5xx response, now when customer retries the request since server A is down, loadbalncer will send the request to server B and since in server B's in-memory database, the idempotency key does not exist, it will again process this request i.e. debit the amount? So how is this scenario handled in Stripe?

Expand full comment