Skip to content
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

Websockets won't work when HTTP/2 is enabled for the upstream cluster #5721

Open
rgs1 opened this issue Jul 16, 2024 · 2 comments
Open

Websockets won't work when HTTP/2 is enabled for the upstream cluster #5721

rgs1 opened this issue Jul 16, 2024 · 2 comments

Comments

@rgs1
Copy link

rgs1 commented Jul 16, 2024

When HTTP/2 is enabled for the upstream cluster, WebSocket connections won't work since they are disabled by default for HTTP/2 in Envoy:

envoyproxy/envoy#8156

This issue can arise when you have two mappings sharing the same upstream cluster, with one having use_websocket: true and the other having grpc: true (which forces HTTP/2 on the upstream cluster). For this case one workaround is to set cluster_tag on the mapping withuse_websocket: true – this will create a dedicated upstream cluster without HTTP/2 enabled.

A possible solution is to automatically set allow_connect in the HTTP/2 options of the cluster:

https://github.com/envoyproxy/envoy/blob/8a149cbce8450b8aaf5575cbd66591e472e9d778/api/envoy/config/core/v3/protocol.proto#L486

when use_websocket is set and the upstream cluster is configured for HTTP/2.

@rgs1 rgs1 changed the title WebSockets Not Working When HTTP/2 is Enabled for Upstream Cluster Websockets won't work when HTTP/2 is enabled for the upstream cluster Jul 18, 2024
@kflynn
Copy link
Member

kflynn commented Jul 25, 2024

@rgs1 Ouch, thanks for the catch! Don't suppose you're interested in working on that? 🙂

@rgs1
Copy link
Author

rgs1 commented Jul 25, 2024

@kflynn of course, I'l send a PR 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants