API lesson 06 · Control reliability and cost
Shared system · deterministic provider fixtures
Harbor Support Drafting API. One bounded request moves through typed items, tools, state, budgets, and evidence without live provider calls.
01 · Smallest useful mechanism
Production clients need admission control, concurrency limits, deadlines, error classification, exponential backoff with jitter, idempotency, caching, and observability of tokens and tool work.
A retry that starts after the user deadline is load, not reliability.
02 · Experiment
Deterministic protocol fixture
This workbench uses inspectable provider-event fixtures and injected failures. It does not make live calls or execute external effects.
Protocol workbench · harbor-budget-v1
Injected failure
Ten clients receive the same retry-after value while one effectful call has an unknown outcome.
The trace has not run.
Commit to an implementation, then inject the failure and inspect the actual state transitions.
03 · Implementation brief
Your learning artifact
Stored only in this browser. No account required; course reset does not delete it.
04 · Check your understanding
Primary sources · verified 2026-08-02
Independent retries at several layers create storms, inflate cost, duplicate effects, and make tail latency worse precisely when a provider is degraded.
Common mistake: More retries always improve success rate. Retries help only transient, safely repeatable operations within the remaining deadline and capacity budget.
Transfer exercise: Run twenty requests into a five-slot queue and compare immediate retry, jittered retry, and admission control during a simulated 429 burst.
Next: Budgets keep the service alive; security and observability make its behavior reviewable without leaking the data it handles.