Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

API behaviour simulator

See how retries with backoff and jitter, rate limiters and circuit breakers behave under load, and what each HTTP status code asks a client to do.

One client's schedule

    How to use

    1. Retries: set how long to wait before the second try, how much longer each later wait is, the longest wait, the attempt limit and the kind of jitter. Then many clients hit an outage together; the chart shows when their retries land.
    2. Rate limiter: pick a request pattern and a limiter. Each request is drawn as allowed (top) or refused with 429 (bottom).
    3. Circuit breaker: set when the breaker opens, how long it stays open and how many trial calls it lets through; the server fails for a while in the middle.
    4. Status codes: a quick table of what common HTTP codes mean and whether a client should try again.

    Keyboard and touch

    Arrow keys on the tabsChange simulation
    Tab and EnterChange a setting, then press Run (or move to the next box)

    Tips

    • Exponential backoff without jitter makes every client retry at the same moments; adding random jitter spreads them out so the recovering server is not flattened again.
    • Only retry requests that are safe to repeat (reading data, or writes protected by an idempotency key).
    • A token bucket allows short bursts up to its size, then a steady rate; a fixed window can let through twice the limit around a window edge; a sliding log is exact but keeps a timestamp per request.
    • When a server sends Retry-After, wait at least that long.
    • A circuit breaker fails fast while a service is down, then lets a few trial calls through to see whether it is back.

    About this simulator

    Everything is simulated with a seeded random number generator, so the same settings give the same picture, and no request is ever sent. Backoff waits are base × multiplier^(n−1), capped; "full jitter" picks a random wait between 0 and that value, "equal jitter" between half and all of it, and "decorrelated jitter" between the first wait and three times the previous wait (the variants popularised in an AWS architecture article). The limiters follow their usual textbook definitions, and the breaker counts failures over a rolling number of calls. Real libraries differ in details; check the one you use. Nothing is sent anywhere.

    See you tomorrow!

    A fresh daily puzzle every morning, and new tools added every month.

    Browse every product