QuizzesTimeouts, Retries and Idempotency — Concept Check
intermediate
full-stack

Timeouts, Retries and Idempotency — Concept Check

Questions on Timeouts, Retries and Idempotency. A request with no timeout can hang forever, a retry without idempotency can charge a card twice, and retrying in a loop turns a slow backend into a dead one.

8 minutes 8 questions Pass at 70%
Time Limit
8 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

8 questions on Timeouts, Retries and Idempotency — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.A service is experiencing high latency and the client is timing out after 10 seconds. The API is set to timeout at 12 seconds. What should be adjusted to prevent resource wastage?

    • ASet the database timeout to 15 seconds
    • BIncrease the client timeout to match the API
    • CDisable timeouts to allow completion
    • DReduce the API timeout to less than 10 seconds
  2. 2.You are implementing retries for a POST request. Which approach ensures safety against duplicate operations?

    • AUse a unique idempotency key for each retry
    • BUse exponential backoff without jitter
    • CRetry only on 5xx status codes
    • DRetry without any idempotency key
  3. 3.A client retries a request without jitter. What is the likely consequence?

    • AThe server will handle retries more efficiently
    • BRetries will be more evenly distributed
    • CRetries will be less frequent
    • DIncreased chance of synchronized retries causing a stampede
  4. 4.Which HTTP methods are inherently safe to retry without an idempotency key?

    • APOST, PUT, HEAD
    • BGET, PUT, DELETE
    • CPOST, GET, DELETE
    • DDELETE, POST, PUT
  5. 5.A developer sets a retry mechanism to retry indefinitely on a 404 error. What is the flaw in this approach?

    • A404 indicates a permanent client error, so retries are pointless
    • BIndefinite retries are efficient for 404 errors
    • C404 errors are temporary and should be retried
    • D404 should be retried with exponential backoff
  6. 6.What is the primary purpose of an idempotency key in a POST request?

    • ATo ensure duplicate requests return the same result
    • BTo increase the speed of POST requests
    • CTo allow retries on 404 errors
    • DTo synchronize retries across clients
  7. 7.A client receives a 429 status code. What should it do next?

    • AHonor the Retry-After header before retrying
    • BSwitch to a different server to avoid rate limits
    • CIgnore the Retry-After header and use exponential backoff
    • DRetry immediately to ensure quick resolution
  8. 8.Why is it important to budget timeouts downwards through the stack?

    • ATo prevent the user from experiencing a timeout while work is still running
    • BTo increase the overall timeout duration
    • CTo allow the database to handle more requests
    • DTo ensure each layer has sufficient time to complete its task