-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
Istio is endeavor to reduce the burden of config the mesh by specifying service port and protocol. It is great to have a cluster for all upstream protocol.
Actually envoy cluster can be used to create tcp upstream connection, http1 and http2. However the limitation is that the cluster api can only specify one application protocol for those 3 connections.
If envoy provide the api of specifying application protocol for http1/2/tcp, we are getting close to the generic cluster. Also xds server can avoid providing 1 cluster for http1, 1 cluster for http2 and 1 cluster for tcp.
My proposed cluster api
message Http1ProtocolOptions {
string application_protocol = 4; // ADD. See usage below
}
message Http2ProtocolOptions {
string application_protocol = 13; // ADD. see usage bellow
}
a yaml cluster message
http_protocol_options:
application_protocol: "http/1.1" // for http1 upstream connection
http2_protocol_options:
application_protocol: "h2" // for http2 upstream connection
tls_context: // Below doesn't change. List as an example
common_tls_context:
alpn_protocols:
- A_TCP_PROTOCOL
Alternative attempt made
Envoy has tls_inspector and http_inspector to sniff the protocol of incoming traffic. However, http_inspector can do nothing if it is ssl traffic since http_inspector relies on encrypted stream.