All jobs / Backend developer / Distributed Systems
Backend developer interview question · 1–3 years
The interviewer asks: “A downstream HTTP call timed out. Do you retry?” Strongest answer?
The strongest answer
Only if the call is idempotent (or has an idempotency key), with bounded exponential backoff and jitter. I don't retry 400s, and I don't hammer a 503 in a tight loop.
Why it works
Exactly. Retries are for transient faults on safe operations. Backoff + jitter protect the other side. 4xx is a contract error, not a blip.
What a good answer covers
- Retry transient + idempotent only.
- Backoff and jitter; cap the attempts.
- Don't retry 4xx.
- No infinite loops.
Answers that fall short
- Close, but not the strongest: Always retry three times immediately — that's industry standard.
There is no universal “three times.” Immediate retries turn one timeout into a thundering herd. - Weak: Never retry; retries hide bugs.
Never-retry makes every blip a user-facing failure. The skill is knowing which failures are transient. - Red flag: Retry in a while(true) until it works so the user never sees an error.
Infinite retry is how you finish an outage. Fail, degrade, or queue — don't spin.
Who gets asked this
More Distributed Systems questions
- The interviewer asks: “Your HTTP client has no timeout. What's the risk?” Strongest answer?
- A RabbitMQ consumer acknowledges each message as soon as it arrives and then processes it. Messages go…
- The interviewer asks: “Your queue consumer ran twice for the same message. What do you do?” Strongest answer?
- What do you tell them, and what does it force on your code?
- The interviewer asks: “The replica is behind. Do you serve stale reads or error?” Strongest answer?
- The interviewer asks: “How do you publish an event only if the order row actually committed?” Strongest…
- The interviewer asks: “We need “all services succeed or none” across order, inventory and billing. What do…
- The interviewer asks: “Consumers are slow. The publisher is fast. What do you do?” Strongest answer?