Circuit breaker

After too many failures, stop calling a dependency for a while and fail fast or return a fallback, then probe it again. It prevents threads from piling up on timeouts and lets the dependency recover.

Where it shows up in real systems

  • Circuit breaker

    Place it between a caller and a fragile dependency. When errors exceed the threshold, the circuit opens: calls return a fallback immediately instead of waiting for timeouts, which keeps the caller's threads free and gives the dependency time to recover.

    In production: Resilience4j, Polly (.NET), Envoy outlier detection, Istio, Hystrix (legacy)

  • Third-party API

    Its latency, rate limits and outages become yours. Cache what you can, set short timeouts, wrap it in a circuit breaker and design a degraded mode for when it is down.

    In production: Google Maps Platform, OpenWeather, Shippo, Anthropic API, OpenAI API

See it break, then fix it

Build an architecture, send it a day of traffic and outages, and learn why it holds or fails. Free to start.