Istio 101 : Defining the response to Error codes in web applications - EnvoyFilter -
In order to help istio handle network problems, we could use for example the automatic retries.
Within the automatic reply parameter, we could also setup other parameters like the below:
- backoff retry time : waiting time between retries - by default it is set to 25 milliseconds -.
- retriable code : by default it is set to HTTP - code 503: Service unavailable -
We could tweak these parameters using the EnvoyFilter resource.
The EnvoyFilter helps us change the settings of the istio proxy envoy.
Remark:
EnvoyFilters are tied to specific pods/virtual machines in specific namespaces as we will see in the Yaml configuration file of the EnvoyFilter.
Below are some of the parameters used:
- HTTP_ROUTE: represents a list of route rules for HTTP traffic.
- SIDECAR_OUTBOUND: represents the outbound route in the sidecar of the pod.
- REPLACE: replaces the existing parameters while MERGE inherits the existing parameters and add new ones to them.
Below is a short explanation of the HTTP codes used above:
- 429: too many requests in a given time.
- 400: bad request from the client application or client error.
Comments