I am trying to configure weight for the destination at runtime because the weight will be decided based on the value set in one of attribute in request payload. can it solved with istio/envoy. Could you please provide any samples!
Hi Asis,
If I understand well your use case, you would like to redirect the request to a specific version depending on an attribute set in the request. You shouldn’t (and you couldn’t) configure dynamically the destination weight at runtime. Instead, Istio support traffic routing depending on http headers: https://istio.io/docs/reference/config/istio.networking.v1alpha3/#HTTPRoute
Let’s assume that you have a service with two versions: v1 and v2 and you have a HTTP header called ‘user-type’ that can have ‘internal’ or ‘external’ value.
You would like to redirect internal users to new version v2. Here is how you should process: