-
Notifications
You must be signed in to change notification settings - Fork 704
Description
There's no way to explicitly tell Contour to use HTTP/1.1 over plain text for upstream communication. The protocol field supports h2, h2c and tls, there's no http or http/1.1 value allowed. If you leave it blank, then Contour will use other, poorly documented and rather fragile means to detect the protocol (such as the name of the port specified in the Kubernetes service, a value that's not supposed to have semantic meaning).
In my use case, I have a service that supports both HTTP/2 over plain text, and HTTP/1.1 over plain text on the same port. For the most part, I want to use HTTP/2 where possible, as gRPC is very commonly used as a protocol, and HTTP/2 is more efficient. However, on some routes, I want to support WebSockets. Contour doesn't support WebSockets over HTTP/2 (that's a separate issue, it requires passing a flag to Envoy), plus neither does my service mesh, so I need to explicitly use HTTP/1.1 for these routes. But Contour doesn't offer any robust means to specify to use HTTP/1.1.