Skip to content
RED SAGSkills
mediumSite Reliability Engineer interview question

How should a client retry failed calls to another service safely?

What the interviewer wants to hear

  • Only retry on transient, retryable errors
  • Exponential backoff with jitter
  • Limit attempts and use a retry budget
  • Idempotency or idempotency keys for writes
  • Respect overall deadlines and retry at one layer only

Model answer

I only retry errors that are likely to be transient, such as timeouts, connection resets, 503 or 429, and not errors like 400 that will fail again. Retries use exponential backoff with random jitter so many clients do not retry together and create a thundering herd. I cap attempts, usually two or three, and use a retry budget, for example retries may not exceed 10% of normal traffic, so a failing dependency is not overloaded. Writes must be idempotent, or I send an idempotency key so the server can safely ignore duplicates. I also propagate a deadline so retries stop when the caller no longer cares, and I retry at only one layer of the stack to avoid multiplying load.

Can you answer it under time pressure?

Take a timed medium round and get scored on every answer.

Start mock interview

More medium Site Reliability Engineer questions