
Bookinfo example
The Bookinfo sample app demonstrates typical service-to-service communication: productpage calls details and reviews. If the details service slows or fails, productpage requests pile up waiting for responses. Circuit breaking lets us fail fast (return an error or fallback) instead of waiting indefinitely, keeping the rest of the system responsive and preventing request queues from growing unbounded.Cascading failure example
Imagine three services: homepage, products, and a database. The products service queries the database, and the homepage calls products. If the database becomes slow, the products service waits, times out, and keeps retrying. The homepage then becomes slow as it waits on the products service, causing more requests and eventually a cascading failure. Circuit breaking stops this chain by tripping when a downstream dependency is unhealthy. Tripping allows callers to quickly receive an error or fallback response so the overall system remains available and the unhealthy component gets isolated for recovery.Why use circuit breaking?
- Prevents spread of failures: Stops calls to an unhealthy service before they cause additional failures.
- Keeps the rest of the system running: Gives struggling services breathing room to recover.
- Fails fast for better UX: Returns a quick error or fallback rather than making users wait indefinitely.
- Provides a signal for troubleshooting: A tripped circuit is an obvious indicator that something is wrong.
Configuration overview
In Istio, circuit breaking is configured inside a DestinationRule’strafficPolicy. There is no standalone “CircuitBreaker” top-level resource. Common controls include connection pool limits and outlier detection (which ejects unhealthy hosts).
Example DestinationRule containing both connection pool settings and outlier detection:
Key fields explained
All of these options (and more) are documented under DestinationRule connection pool and outlier detection settings. Review the official docs for the complete list of options and real-world examples: https://istio.io/latest/docs/reference/config/networking/destination-rule/
Another example for a reviews service:
Circuit breaking (connection pool settings and outlier detection) is configured in
DestinationRule. The exam often asks about these settings—review the DestinationRule documentation and examples: https://istio.io/latest/docs/reference/config/networking/destination-rule/.Quick troubleshooting checklist
- Verify DestinationRule
hostmatches the service FQDN. - Confirm values are appropriate for traffic patterns (don’t set
maxConnectionstoo low). - Use metrics and logs (Envoy and Istio telemetry) to see ejection and connection counts.
- Tune
consecutive5xxErrors,interval, andbaseEjectionTimebased on observed failure modes.
Links and references
- Istio DestinationRule docs: https://istio.io/latest/docs/reference/config/networking/destination-rule/
- Istio Traffic Management overview: https://istio.io/latest/docs/concepts/traffic-management/