How would you retry an LLM API call without creating a retry storm?
Understand the idea, explain it in your own words and use the rubric to find your next learning gap.
The idea behind the question
Retries consume time and quota and can amplify an outage. A safe policy considers failure category, total deadline, backoff, concurrency and whether the operation can be repeated.
A shared worker pool receives HTTP 429 responses and every worker immediately sends the same request again.
A practical way to learn it
Write a retry-policy table for 400, 401, 429, 503 and a network timeout. Add a total deadline and an explicit non-retryable action.
Open online notepadThe related tool opens separately; your interview answer stays here. Written practice is self-guided, without automatic code grading.
Build an explanation you understand
- State what the concept does in plain language.
- Apply it to the example and make your assumptions explicit.
- Explain a trade-off, failure case and how you would test it.
- Distinguish your actual experience from a proposed approach.
How would you explain it?
Single-question timers reset on refresh. Full mock sessions can resume from this browser.
Strengthen your explanation
Compare reasoning, not identical wording. Reference answers describe a possible approach; replace hypothetical statements with truthful details from your own work.
One way to answer
I would classify retryable conditions and use a bounded attempt count within an overall deadline. I would honor a valid Retry-After hint when practical, apply backoff with jitter and coordinate concurrency rather than let every worker retry at once. Authentication and invalid-input errors would not be blindly retried. If an operation can cause a side effect, I would require an idempotency or reconciliation strategy. I would measure retry volume and final outcomes separately from initial failures. A retry policy needs a stop condition and a clear user-visible failure when its budget is exhausted.
What a strong explanation should cover
Tick only the points your own answer addresses. This is self-assessment, not AI scoring.
0 / 3 points self-reportedWatch out for
- Retrying every non-200 response immediately and forever.
Now go one level deeper
- How would cancellation interrupt a backoff delay?
- What signal would make you stop retries during an outage?
Further reading
Further-reading links support learning; the reference is Sukoaa-authored, not an official employer answer key.