Istio 101 : Loadbalancing, attempts and retries - DestinationRule, VirtualService -

Istio provides loadbalancing for kubernetes.

It also supports retries for failing pods and circuit breaking to reject requests for pods with a "degraded" service.

It also provides it with "pool ejection", which stops pods and removes them as a destination for the loadbalancer.

Below is an example of kubernetes without Istio:

The below diagram shows kubernetes with Istio:

Some of the functions of the the proxy sidecar include:
  • packet forwarding.
  • routing.
  • caching.
  • loadbalancing.
Below is a basic "RANDOMloadbalancing rules for our service:

We could use the VirtualService to implement a timeout for our service in case it fails, so the client application would just sit around waiting for a service that has failed:

We could use the retry feature of Istio to can make more attempts to try to connect to an unresponsive service.
Using a VirtualService, we could specify the "retry" parameter:

The above 
VirtualService make "5" attempts and has "10" seconds timeout after each "retry". 


Leave as a comment: