Istio 101 : Circuit breaker for the pods
In the above VirtualService all traffic goes to "application1". The below DestinationRule has an effect on "application1" and all its traffic.
We can create a circuit breaker for our service using a destination rule as follows:
Above is the configuration file for a circuit breaker for any client applications making a request to the "application1" of the "svc1.ns1.svc.cluster.local" service.
We are putting a cap on the number of connections and number of
pending requests to "2".
Below is a short explanation of some of the parameters used in the above Yaml file:
- BaseEjectionTime : the maximum ejection duration for a host before getting taken into account again
- ConsecutiveErrors : errors before a host is ignored from the loadbalancing pool.
- Interval : the interval for looking into the ejected pod.
- MaxEjectionPercent : percentage of hosts that can be ejected from the load balanced pool.
Comments
Post a Comment