Circuit breaker
A guard that stops calling a failing service for a while after repeated errors, then lets one trial call through.
A circuit breaker stops you hammering a provider that's down. After several failures in a row, it opens: calls are skipped at once for a cooldown period, and the fallback is used. Then it lets one trial call through (half-open). If that succeeds it closes again; if not, it reopens. This keeps users from waiting on timeouts, and gives the provider room to recover.
Try it now
Requests × tokens × price, using the Opus and Haiku prices from Phase 1. Send easy requests to the small model and watch the bill drop.
Learn it properly
Designing AI systems · Latency, cost, routing, fallbacks and guardrails for features built on models. About 40 minutes.
Other terms from the same lesson
- model routing: Sending each request to a suitable model, such as easy ones to a small cheap model and hard ones to a large one.
Never trained an AI?
Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.