All Questions
Sharding hard

When implementing a 'Saga' or distributed transaction across shards, why is an 'Idempotency Key' absolutely mandatory for every request?

  1. A To provide a cryptographic hash of the user's password for secure multi-node authentication.
  2. B To prevent 'Dreaded Double-Spend': if a network timeout occurs, the client will retry the request. The Idempotency Key allows the server to recognize the retry and return the previous success instead of processing the transaction twice.
  3. C To ensure that the request is routed to the shard with the most available CPU capacity at that specific microsecond.
  4. D To allow the database to automatically convert the transaction into a single-node request to save on network bandwidth.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions