Unclear how to specify upstream (webserver) HTTP protocol #1244
Replies: 4 comments 22 replies
-
Yeah, I seem to recall us discussing using the It's intended that the front protocol be represented with the Listener None of that covers "supports Websockets" though. In HTTPProxy, we have a separate field for that, along with an annotation that could go on an Ingress object. (Obviously annotations are to be avoided here if possible, but worth noting for historical reasons). So, in summary, I think that the combination of the Listener protocol and the AppProtocol should be able handle the "Upgrade to HTTP/2" case, but that we need to figure out what to do for the "Supports Websockets" dimension (which is not entirely orthogonal, but may be better served with a separate mechanism.) |
Beta Was this translation helpful? Give feedback.
-
Is there a discovery protocol for HTTP2 (2c in particular). @robscott was there some standardization on the format for AppProtocol wrt to to HTTP/2? |
Beta Was this translation helpful? Give feedback.
-
Reading back over this, I thought it might be worth writing down what I think the problem is, and what I think we could do about it. (We had a similar problem in Contour for HTTPProxy, so there's some relevant experience to add.) We need to have a way to be able to supply details for backends about:
These are mostly distinct from the Listener-side behavior for the HTTPRoute case, and are pretty limited for the TLSRoute case. They shouldn't matter for the TCPRoute or UDPRoute case. They'll also be necessary for some uses of the new GRPCRoute when it's done, I guess. Seems to me like we have a few options: Use Service's
|
Beta Was this translation helpful? Give feedback.
-
I've opened GEP #1282 to track the overall work to sort out a full solution to this. I'll write up the start of what I think it should look like in a gdoc and post the link in there. |
Beta Was this translation helpful? Give feedback.
-
TL;DR: I need to be able to specify whether application pods behind an HTTPRoute support HTTP2 over cleartext (prior knowledge or h2c) and/or websocket. In particular, my pods do support both, but the Contour implementation (at least) defaults to vanilla HTTP/1.1, and the API spec as a whole doesn't seem to provide any way to change that.
Background:
I'm attempting to fix up Knative's Gateway-API adapter, and I've run into a problem getting some of our tests (which work with both Istio and Contour using their native interfaces) to work with Gateway-API implementations. In
net-contour
, we have the following bits, which I believe roughly correspond to Envoy options:https://github.com/knative-sandbox/net-contour/blob/main/pkg/reconciler/contour/resources/httpproxy.go#L216-L224
I'm not sure how you want to do this; @youngnick suggested using the
AppProtocol
field of v1.Service, but I believe all the variations mentioned above are valid on port 80 /www
/http
/www-http
, so it's not clear how you'd toggle the "supports Websocket" bit, or the "Upgrade to HTTP/2" bit.Beta Was this translation helpful? Give feedback.
All reactions