All Questions
Multi Step Processes hard

To implement robust Idempotency for an API `POST /orders`, why is it risky to store the 'Idempotency Key' in Redis while storing the 'Order' in PostgreSQL?

  1. A You lack atomic commitment across two different systems. If you write the Order (SQL) but fail to write the Key (Redis), a retry will duplicate the Order.
  2. B Redis is too slow.
  3. C PostgreSQL cannot generate UUIDs.
  4. D Redis keys expire.

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

Get the app

Related questions