-1

I am trying to learn istio. I was able to setup a simple traffic shifting in which 40 percent traffic goes to a particular version and the remaining 60 percent to other version. My doubt is can I make this weight(40-60) dynamic, based on

  1. Percentage of error response from both the versions. The version with less error response faces more traffic and eventually 100 percent.
  2. Or atleast, change with time, example 2 percent shift every hour.

Also, would this require me to do kubectl apply again and again.

piet.t
  • 11,718
  • 21
  • 43
  • 52

1 Answers1

0

For the first part, there are no features to make a VirtualService route based on error rates in Istio. The routing is based on the number of requests coming through the VirtualService.

Secondly, given that Kubernetes objects are persistent entities and the Istio's CRDs controlling the weight-based routing have its settings defined in the spec of the object (of which state must be provided by the user), it's unexpected that this configuration would change dynamically.

For your scenario, I would say that deploying a new version without knowing if it will error more than the previous one, and expecting them to error enough to decide which is to persist may not be the best approach.

I'd recommend using traffic mirroring for testing the production traffic in the new version, and from that, determinig if is worth deploying it using any existing/supported deployment strategy.

yyyyahir
  • 2,262
  • 1
  • 5
  • 14