1. Verify the namespace is Istio-injection enabled
Confirm your target namespace has theistio-injection=enabled label. If it is not labeled, add the label and re-deploy your workloads so sidecars are injected.
Example to check labels:
2. Deploy the Echo server and Service
Create a Deployment (e.g.,echo_deployment.yaml) for a simple HTTP echo server that listens on port 80, and expose it via a ClusterIP Service echo-server.
Service manifest (echo_svc.yaml):
3. Deploy Fortio (load tester)
Fortio is a lightweight load tester you can run inside the cluster to generate requests to the echo service. Deploy Fortio and confirm the pod is running:4. Create a VirtualService (simple passthrough)
Create a VirtualService that intercepts traffic forecho-server and routes to the same Kubernetes Service. This keeps routing explicit and prepares the path for upstream policies.
vs.yaml:
5. Create a DestinationRule to implement circuit breaking
Circuit breaking in Istio is enforced by DestinationRule throughconnectionPool limits and outlierDetection. Create a DestinationRule to limit connections and eject unhealthy hosts.
dr.yaml:
connectionPool.tcp.maxConnections: 1— only 1 concurrent TCP connection to the upstream.http.http1MaxPendingRequests: 1&maxRequestsPerConnection: 1— limited pending and per-connection requests.outlierDetection.consecutive5xxErrors: 1— a single 5xx can mark a host for ejection.interval,baseEjectionTime,maxEjectionPercent— control detection frequency and ejection behavior.
6. Generate load to trigger the circuit breaker
Start with a simple request from Fortio to confirm correct routing:maxConnections and pending request limits; when those are exceeded, it rejects requests with 503.
7. Adjust DestinationRule and observe effect
To allow more concurrent traffic, increase connection and request-per-connection limits in the DestinationRule, reapply, and re-run the load test. Example changes insidedr.yaml:
When setting connection pools and circuit breakers, align limits with your application’s real concurrency and connection behavior. Overly strict limits can cause apparent outages under legitimate load.
8. Inspect Envoy proxy stats (pilot-agent)
To view circuit breaker metrics exposed by the sidecar, query the pilot-agent stats endpoint from the pod’sistio-proxy container. These stats show pending totals and overflow/rejection counters that explain observed 503s.
Example command (filtering for echo-server and pending counters):
upstream_rq_pending_total— total pending requests.upstream_rq_pending_overflow— number of requests rejected due to pending limits.
Circuit breaking and aggressive rate-limiting can be disruptive. Do not apply global or overly strict DestinationRule policies in production without monitoring, staging, and understanding application behavior.
9. DestinationRule options and examples
DestinationRule includes several useful configuration groups for connection management and resilience.
More complete examples:

10. Summary
- Istio circuit breaking is configured via DestinationRule using
connectionPool(limits) andoutlierDetection(host ejection). - VirtualService routes traffic; DestinationRule enforces proxy behavior on the destination.
- Use Fortio (or similar tools) to generate load and verify how Envoy responds when limits are reached (often 503).
- Inspect sidecar stats (
pilot-agent/ stats endpoint) to diagnose pending/overflow counters. - Always test and tune connection-pool and outlier settings to match your application’s concurrency model before applying policies in production.
- Istio DestinationRule docs: https://istio.io/latest/docs/reference/config/networking/destination-rule/
- Fortio: https://github.com/fortio/fortio
- Envoy stats and cluster metrics: https://www.envoyproxy.io/docs/envoy/latest/metrics/overview
connectionPool and outlierDetection settings.