All Questions
Api Design easy

A client retries a failed 'POST /payments' request due to network timeout. The server receives the request twice. Without idempotency handling, what can happen?

  1. A The server automatically detecting the duplicate IP and rejecting the second request.
  2. B The server creating a second payment resource, resulting in a double-charge.
  3. C The database rolling back both transactions due to a primary key collision.
  4. D The load balancer caching the first response and returning it to the client.

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

Get the app

Related questions