Skip to content
Atlas, your robot learning host

Interim portrait

Atlas · Foundations retry-with-backoff

Hello, little human. I am Atlas. One useful idea is plenty for a beginning. Read the explanation, then explore an example.

Choose your robot No recording yet · text complete
concept for everyone
  • web

Retry With Backoff

Delaying eligible retries, with limits and jitter, can reduce pressure on a struggling dependency; waiting does not guarantee recovery or make repeated changes safe.

Tune in, human.

Reviewed videos and Shorts

Captions requested · no autoplay

Finding reviewed videos…

    Keep the useful bits, human.

    Beginner field notes

    Choose explanation level
    • A retry is another attempt. Backoff waits before trying again instead of sending the next attempt immediately.
    • Spacing eligible retries can reduce pressure on a struggling service. Waiting does not guarantee that the service recovers.
    • A timeout means the caller waited without the expected result. The service might already have applied the change.
    See a worked example

    Separate bounded waiting from a timed-out save

    One reviewed sample, shared across levels. Nothing here runs on your computer.

    Example review recorded 2026-10-17 · version 1.

    Example input · do not paste
    Fictional Lantern Archive contract:
    The saved label of box B7 starts as Seeds. There are no other writers, extra jobs or partial saves in this example.
    Each attempt uses this identical simplified request description (method, URL, header and body). It is not a raw HTTP message or a terminal command:
    Method: PUT
    URL: https://archive.example/boxes/B7/label
    Header: Content-Type: text/plain
    Body: Tools
    This operation replaces the saved label with the body value. Repeating it has the same intended label; it does not append a label or increment a counter.
    Only the stated timeouts and temporary 503 responses are retryable under this fictional application policy. Stop on HTTP 200 with body Stored label: Tools, on another outcome, or after four total attempts. No Retry-After header is present.
    After failures 1, 2, 3: exponential bounds 1s, 2s, 4s, capped at 2s give 1s, 2s, 2s. The full-jitter choices are fixed beforehand at 0.4s, 1.2s, 1.6s, each within its bound. Measure each wait after that attempt ends; request durations are separate.
    Given service trace (not information the caller learns from a timeout):
    1. The service saves Tools; the reply is lost and the caller times out.
    2. The caller receives 503; this service trace says it rejects this attempt before processing the label change.
    3. The request is lost before service processing; the caller times out.
    4. The service processes the same replacement and replies 200 with body Stored label: Tools.
    Example output · do not paste
    Attempt 1: caller sees timeout and cannot determine the effect from that alone. Given service trace: saved label Tools. Wait 0.4s before attempt 2.
    Attempt 2: caller receives the stated temporary 503. Saved label stays Tools under the given trace. Wait 1.2s before attempt 3.
    Attempt 3: caller sees timeout and cannot infer its effect. Given trace: no new processing; saved label Tools. Wait 1.6s before attempt 4.
    Attempt 4: response 200 with Stored label: Tools confirms this replacement under the example contract. Stop. No fifth attempt.
    Three waits total 3.2s, excluding all request durations. Maximum attempts 4; retries actually made 3.
    If attempt 4 instead timed out, the policy would stop at the same limit, with no invented conclusion about whether a save happened.

    Follow the caller-visible outcomes separately from the supplied service facts. The bounded waits control when eligible attempts happen; the replacement contract controls the intended effect of repeating this operation. Backoff caused neither a guarantee of recovery nor the safety of repeating a change. This text performs no request, random sampling, timing, save or other action.

    Sources for this sample

    Visual

    An unacceptable result leads to another attempt only when the operation contract permits it and a budget remains. A bounded wait separates attempts; stopping does not invent the outcome of a timed-out operation.

    The reviewed description and complete diagram source are available here.

    Read the complete diagram source

    This is the source for the reviewed diagram, not a command to run.

    flowchart TD
      A["Attempt the chosen operation"] --> R{"Acceptable result?"}
      R -->|"Yes"| S["Stop with the stated result"]
      R -->|"No"| Q{"Contract permits retry and budget remains?"}
      Q -->|"No"| E["Stop; keep unknown effects unknown"]
      Q -->|"Yes"| W["Wait using bounded backoff and jitter"]
      W --> A
    Full explanation and primary sources

    Reviewed explanation

    A retry makes another attempt at an operation that did not give the caller an acceptable result. Backoff inserts a wait before a later attempt. When a dependency has a temporary problem, spacing eligible attempts can give it room to recover instead of adding a burst of new work. The dependency is the service this caller relies on. Waiting can help reduce pressure; it cannot repair every failure or promise success.

    An exponential policy grows the delay bound after successive failures. For illustration, doubling from one second gives bounds of one, two and four seconds; a two-second cap makes them one, two and two. Capping the delay alone does not stop retries. Our example also limits the operation to four total attempts: the initial attempt plus at most three retries. It stops sooner on the stated success or an outcome its contract does not permit retrying. These numbers teach the mechanism; they are not production settings to copy.

    Jitter varies a delay so many callers are less likely to return together. Our fictional full-jitter rule chooses a wait between zero and the current capped bound. The example supplies the choices in advance: 0.4, 1.2 and 1.6 seconds. Nothing here draws random numbers or waits in real time. A wider bound does not mean each actual jittered wait must be longer than the last, and different callers can still collide.

    A timeout is evidence about the caller’s wait, not proof that the service did nothing. The first attempt below saves Tools, but the reply is lost. We know the save occurred only because the exercise explicitly gives that service trace; the caller cannot infer it from the timeout. Repeating this particular replacement has the same intended final label under the stated contract. Waiting longer would not make an add-one counter or another nonrepeatable change safe. Real services can record logs or other incidental effects even when the requested operation is idempotent.

    This is a chosen HTTP application example, not a claim that all retries use HTTP. Its explicit application policy permits retrying the same replacement after the listed temporary failures, within its budget. RFC 9110 advises against automatically retrying a failed automatic retry; this teaching policy is not a general HTTP-client default or a recommendation to bypass an SDK’s safeguards. Real retry decisions need the operation’s documented semantics, permitted failures and existing client behavior. Adding retries at several layers can multiply load.

    A server may send Retry-After to advise when a follow-up request should be made. Its value can be a date or a delay in seconds; it is not a guarantee that the service will be healthy then. The worked trace has no Retry-After header. A real policy must account for server guidance and its remaining budget rather than blindly using this toy schedule.

    Only the fourth response in the trace confirms to the caller that the requested label replacement completed. That statement comes from this example’s explicit response contract and body, not from treating every 200 response as completion of all possible downstream work. If the fourth attempt also timed out, this policy would stop without a fifth attempt; stopping would not establish whether the earlier change happened. Inspecting or reconciling an uncertain result is separate work.

    Source collection

    Notes AI source review · 2026-10-17

    AI source comparison recorded 2026-10-17. Human learner validation is pending.

    Quick quiz · one question

    Give the service some room

    Sample scenario. Both paper schedules permit three attempts. The dependency is known busy in [0,500) ms; no outcomes or later health observations are supplied. Ignore request duration. These are invented offered-attempt offsets, not measurements or a universal retry policy.

    Same permitted attempts
    Three offered attempts. Supplied retry waits: 1000, 2000 ms, compared with zero waits between the same three offers.
    Known busy observation window
    [0,500) ms; start included and end excluded. No response or health observation is supplied after it.
    Counting boundary
    Fictional wait-only offered schedules, not measured traffic, service processing or a recovery guarantee.

    Which schedule offers less work during the known busy window, and what does that tell us about recovery?

    Answers stay on this device.

    Sources and exercise scope

    Original synthetic exercise. AI comparison against the reviewed lesson recorded on 2026-10-20; the references above state their scope. Human learner validation has not been run. A result here records this attempt; it does not establish mastery.

    Follow this learning pathLesson 8 of 8
    Save or adjust this lesson
    Reference notes · file removal and public access

    Robot reference desk

    Understand what can change

    These reviewed public notes are available to everyone. They do not establish that an operation ran or inspect your files, backups or permissions.

    File removal

    Before deleting files: deleting a file can remove it without putting it in Trash or a recycle bin, and recovery is not guaranteed. Check the intended targets and whether a usable backup or recovery option exists before continuing.

    Sources for this note

    Public access

    Before making a resource public: public read access can let anyone view the exposed content, and public write access can allow changes to data. Check the actual audience, exposed content and allowed operations before continuing. This guidance does not inspect or change your permissions.

    Sources for this note

    A link can carry these public reference topics in its fragment. Page scripts, extensions, browser history and copied links can read them. This page attempts to minimize that fragment when JavaScript runs; reloading afterward can lose the selection. No project details or conversation text belong in a lesson link. Privacy details.