Skip to interview prep
Apexed

45. Why do services need timeouts, retries with backoff and circuit breakers together?

MediumDebugging & production

Technical
Show model answer

Timeouts stop a slow dependency from holding threads and connections forever. Retries recover from brief transient failures, but must be bounded, use exponential backoff with jitter, and apply only to idempotent or idempotency-keyed operations, or they amplify an outage.

A circuit breaker stops calling a dependency that keeps failing, fails fast, and probes periodically to recover, protecting both sides. Together with bulkheads (separate pools per dependency), they prevent one slow service from cascading into a full outage.

Why do services need timeouts, retries with backoff and circuit breakers together — Software engineering interview question — Apexed