Performance & Scalability interview question · Most asked
Why are timeouts, retries and circuit breakers essential for performance and reliability?
Summary
Without timeouts, slow dependencies tie up threads and connections until the whole service stalls (cascading failure). Retries recover from transient errors but can amplify load; circuit breakers stop calling a failing dependency for a while so it can recover and callers fail fast.
Longer Answer
Set timeouts per call based on SLOs, retry only idempotent operations with exponential backoff, jitter and a retry budget, and use bulkheads (separate pools) to isolate dependencies.
Key Points
- Timeouts on every remote call
- Bounded retries with jitter
- Circuit breakers fail fast
- Bulkheads isolate failures