Skip to content

Feature request: Allow specify application protocol in cluster upstream transport socket #8197

@lambdai

Description

@lambdai

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    design proposalNeeds design doc/proposal before implementationstalestalebot believes this issue/PR has not been touched recently

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions