Open johnharris85 opened 2 years ago
Triage: @bartsmykla looked at this in the past and he believes he didn't go this way because he wasn't aware of
allow_connect
. This suggestion looks great just need to make sure all cases still work. Also this would be the default for all inbounds withkuma.io/protocol: http
. In any case we need good testing of this.
This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant please comment on it promptly or attend the next triage meeting.
This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant please comment on it promptly or attend the next triage meeting.
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.
I'm currently troubleshooting a graphql-ws connection (and thus ended up here), I have set it up as a TCP service but I can sucessfully use the connection for HTTP as well for normal graphql HTTP calls (note the node.js server splits it to two different clients).
Is this issue meant to push for full support of http rather than limited support, or do you don't see yourself able to use http & websocket at the same time at all?
That's a very good point @chris-aeviator maybe ability to upgrade to ws
is more of a route level parameter on an http service. @johnharris85 what's your opinion?
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.
re-pinging @johnharris85: what's your opinion?
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.
Description
Currently our documented solution for websockets support is to designate the service as
tcp
: https://kuma.io/docs/1.6.x/policies/protocol-support-in-kuma/#websocket-support. However this discounts services that may provide websocket and regular services (requiring anhttp
designation for various policies / functionality to work).Is there a way we could provide websocket support with an
http
service leveraging Envoy'supgrade_config
?How can we support this on MeshGateway?
Sample ProxyTemplate to achieve this below:
This is slightly simplified (the
http2_protocol_options
really only need to be on theinbound
HCMs). Also there are two options w.r.t. protocol options. Because HTTP2 doesn't support websocket upgrade, you either need to set the outbound cluster tohttp_protocol_options
(to force HTTP1.1) or setallow_connect
on thehttp2_protocol_options
to allow HTTP2 between Envoy's but allow it to use CONNECT protocol to essentially tunnel it through to the eventual upstream. Depends on the use case / requirements as to which you'd use I guess :shrug: