Errors and releases that break pages · mid
Retry storms and polling from the browser
When the API has errors, browsers can make it worse with immediate retries, many tabs polling and refetch on focus. Control retries on the client and protect the server.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- Look at requests per user and per endpoint, the fetch wrapper retry policy, polling intervals and data library settings (React Query or SWR retry, refetch on focus and reconnect).
- Stop it now: the backend sheds load (rate limits, Retry-After) and a remote config or kill switch that the client reads turns off polling or retries. A CDN rule can serve a cached fallback.
- Causes: immediate retries with no backoff, retries at several layers at once (wrapper times library), every open tab polling, refetch on window focus.
- Twist: still high with retries off points to an effect loop (an effect whose dependency is a new object on every render) or all tabs reconnecting at the same moment.
- Design: exponential backoff with full jitter (a random wait between 0 and the smaller of a cap and base x 2^attempt), a limit on attempts, retry only idempotent requests and only on 5xx or network errors, honour Retry-After, add a client-side circuit breaker, pause polling in hidden tabs, and use idempotency keys for POSTs like "place order".
- Test with fault injection in staging (mocked 503s), a load test with many simulated clients and unit tests on retry timing.
- Communicate with the backend team in one incident channel, give status to the business, and write a postmortem with fixes on both sides.
The red pen
Common traps: mistake → fix
Mistake: Retrying fast gives a better user experience
Fix: in an outage it multiplies load.
Mistake: Retry any request that fails
Fix: retry only idempotent requests, or use idempotency keys.
Mistake: Polling is simple and harmless
Fix: many tabs at a short interval create heavy load.
Easy to hard
Questions interviewers ask, easy to hard
- API errors have turned into a retry storm from the browser. What do you do?
- How do you design client retries?
- Request volume is still high after you disabled retries. What else?
- How do you test retry behaviour?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.