hard20 pts · first answer countsdatabasesredisidempotency
Two payment retries run at once
A payment API checks Redis for the idempotency key with GET, and if it is missing, processes the payment and then SETs the key. Two retries arriving together both charge the card. What is the fix?
Discussion 0
Join free to post in the discussion.
Related questions
- The non-idempotent methodBackend Developer
- Redis TTL after SET with EXBackend Developer
- Building SQL from user inputBackend Developer
- What atomicity guaranteesBackend Developer
- WHERE column = NULL finds nothingBackend Developer
- COUNT(*) versus COUNT(column)Backend Developer
- Column type for pricesBackend Developer
- Storing order times for two countriesBackend Developer