-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traffic shifting with envoy.extensions.filters.http.stateful_session.v3.StatefulSession #19776
Comments
If this issue is more appropriate for istio, happy to move it. |
Just to double check - on subsequent curl requests did you send the cookie? Curl doesn't automatically. I think you mentioned browser which should do that automatically but just checking |
Good point, on subsequent curl requests I did forget to do that, but I was mostly using the browser for testing, but copying the curl output for the issue. So I think the issue is valid (but I will go double-check this). |
|
/assign |
hi, @pcj |
@wbpcode Thank you for looking into this. Is the conclusion that it is not possible to implement this scenario? |
FWIW (prior art), this turns out to be supported by apache (both session stickyness and traffic shifting). A little sad that envoy can not 😢
|
Envoy can worked for this scenario, but Istio cannot. It's possible for Envoy to implemented But Istio choosed |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions. |
Summary
I'm trying to get the following scenario to work (copied from a slack thread):
This is an important invariant to hold when doing blue/green or canary deployments, because the javascript and css files are likely only internally consistent between app versions. It does not make sense to serve half the application from v1 and the other half from v2.
I am trying to demonstrate this using the Traffic Shifting example, hoping to use the feature developed in #18207 to satisfy this requirement.
The TL;DR; is that while I can demonstrate traffic shifting and the stateful session cookie being set, the presence of the cookie does not seem to override the routing decision make by the traffic shift.
Repro
As it turns out, the master version did not have #18207 fully merged in. istio/proxy#3689 should fix that. As a workaround, I am using
gcr.io/howardjohn-istio/proxyv2:stateful2
and specificallysha256:47df8c1c46f5961c57919969454664d4e30887f46893a34fa1dc1b62f849716f
.Bookinfo
Also:
At this point the bookinfo app is working:
$ curl -s -D - -o /dev/null http://20.104.235.95/productpage HTTP/1.1 200 OK content-type: text/html; charset=utf-8 content-length: 4183 server: istio-envoy date: Tue, 01 Feb 2022 23:08:05 GMT x-envoy-upstream-service-time: 30
Applying a 50-50 split per the example:
This turned out not to work, so I also created a
productpage-v2
and a 50/50 split for that for experimentation:Stateful Session
I used various permutations of the envoyfilters, but these are the two I ended up experimenting with the most:
$ k apply stateful-gateway.yaml
Having applied the
stateful-gateway
(for example), the cookie is indeed being set :However, this was not effective in making the traffic route to
productpage-v1
orproductpage-v2
reliably... I still observed a similar 50/50 distribution of the traffic split.Other experiments using different contexts (
SIDECAR_OUTBOUND
), different workload selectors (e.g., forreviews
), and other permutations either had the same outcome (no stickyness), or no cookie being set on the final response (curl or browser).Hoping to get this working! Thanks in advance.
cc @wbpcode @howardjohn
The text was updated successfully, but these errors were encountered: