Skip to content
Clairos Learn

Inference requests and APIs · Lesson 8 of 16 · 5 min

Review retry boundaries

Retry policies need a maximum attempt count, delay and retryable failure set. Unbounded retries can amplify overload and duplicate work.

Mastery 0/3Run itExplain itApply it
learner@clairosSimulated AI Ops lab
learner@clairos:~ $
↑ history · Tab complete · Ctrl+C cancel · Esc, Tab to leaveExit 0

Understand the pattern

Retry policies need a maximum attempt count, delay and retryable failure set. Unbounded retries can amplify overload and duplicate work.

Interpret the evidence

Stop automatic retries because this request has exhausted its three-attempt budget.

A tempting mistake

Keep retrying indefinitely whenever the status is 503.

All names, measurements, prices, versions, and thresholds in this exercise are fictional training data. The evidence supports this bounded scenario, not a claim about a live provider.

Worked example and expected result
$ cat /opt/ai-lab/cases/aiops-inference-apis-008.json
{
  "fixture": "Fictional training data; not a live measurement.",
  "status": 503,
  "retryable": true,
  "attempts_used": 3,
  "max_attempts": 3
}

Exit status: 0. The command completed successfully in the training fixture.

$ jq .attempts_used /opt/ai-lab/cases/aiops-inference-apis-008.json
3

Exit status: 0. The command completed successfully in the training fixture.

$ printf '%s\n' 'stop-retry-budget' > /home/learner/lab/aiops-inference-apis-008-decision.txt
(no output; exit 0)

Exit status: 0. The command completed successfully in the training fixture.

Try a variation

Name the assumption that would have to change for “stop-retry-budget” to stop being the justified action. Do not silently replace missing evidence with a guess.

Explain it

What does the evidence in “Review retry boundaries” justify?

Apply it elsewhere

A colleague concludes: “Keep retrying indefinitely whenever the status is 503.” What should you do?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Inspect a request identifierTry an incident drill

Anonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.

Keep learning

  1. 01Reason about timeoutsTimeouts must identify which layer stopped waiting. If the client deadline is shorter than normal server work, the client can time out while the server keeps processing.Practice
  2. 02Inspect a request identifierA request identifier ties a client operation to gateway and runtime evidence. Record the identifier rather than copying the whole prompt into ordinary logs.Practice
  3. 03Follow a trace identifierA trace identifier connects spans across component boundaries. Use the shared trace ID and parent relationships to reconstruct one request path.Practice