Fix istio demo: Internal request route not base on weight but replica count #44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Notes
Hi Team, I find the Istio demo (both
istio
andistio-subset
) fine-grained, weighted traffic shifting feature has issue for internal request.A lot of uses are learning from this demo and they maybe not expert in istio, so we'd better to fix it and provide best practice for them, otherwise we will misleading them.
(It is not easy for beginners to fix it by themselves, like me...)
Could you take some time to review it.
Thanks
Architecture
The green path is external request,
istio-rollout.apps.argoproj.io/color
works well. becauseistio-rollout-vsvc
apply toistio-rollout-gateway
, and external request go through istio-ingressgateway(istio-rollout-gateway)istio-rollout.apps.argoproj.io
can be matched, so it can usehttp.route
ruleThe red path is internal request, because the VirtualService
istio-rollout-vsvc
not apply to servicemesh
, andistio-rollout.rollouts-demo-istio.svc.cluster.local
go through mesh but not gateway, it only uses Serviceistio-rollout
's endpoints,http.route
rule doesn't work for this request.How to fix
The fix contains 2 parts.
istio-rollout-vsvc
apply tomesh
{servie}.{namespace}.svc.cluster.local
, e.g.istio-rollout.rollouts-demo-istio.svc.cluster.local