-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Allow specify application protocol in cluster upstream transport socket #8197
Comments
@envoyproxy/api-shepherds Could you take a look? |
@lambdai I don't fully understand what you are after. Can you explain at a high level what you want Envoy to do with this information? |
The idea is to allow HCM and tcp_proxy specify the same cluster. You may ask what protocol the endpoint would server: http or non-http. The answer is we don't know. We use sniffer to choose between HCM filter chain and tcp filter chain and embed the protocol to envoy upstream.
Currently clusterX and clusterY diffs only at alpn_protocols. It would be nice we can merge the two cluster X and Y into one
|
But what are you actually after? Just setting ALPN? Or something else? |
I would say that's a override/added In the end to end story is, downstream envoy could sniff the plain text protocol, encrypt the traffic between downstream envoy and upstream envoy, and deliver the protocol to upstream envoy. Comparing to the attempt to exchange more than protocol, this cluster impl reuse the mechanism built in TLS. |
I discussed this offline with @lambdai and my general feeling here is we should try to build on the existing original src/dst socket option support in both TCP/HTTP to also allow transport socket options to be altered by filters, and then fed into the conn pool creation code (with appropriate hashing). In this way, ALPN could then be modified by filters and everything would "just work" I like this option as it would not require any new config and would also be a nice new extension point for other filters. @lizan WDYT? |
Adding TransportSocketOptions to override ALPN sounds reasonable to me. |
Steps:
|
@lambdai I think TransportSocketOptions are already affect select or create ConnPool, no? |
@lizan TransportSocketOption has hash_key affecting conn pool |
More context behind the problem can be found in this comment: istio/istio#17002 (comment) |
Description: Override ALPN in transport socket options Risk Level: Low Testing: Unit test Docs Changes: N/A Release Notes: N/A Fixes #Issue: Part of #8197 Signed-off-by: crazyxy <[email protected]>
Description: Override ALPN in transport socket options Risk Level: Low Testing: Unit test Docs Changes: N/A Release Notes: N/A Fixes #Issue: Part of envoyproxy#8197 Signed-off-by: crazyxy <[email protected]>
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions. |
Description: Override ALPN in transport socket options Risk Level: Low Testing: Unit test Docs Changes: N/A Release Notes: N/A Fixes #Issue: Part of envoyproxy#8197 Signed-off-by: crazyxy <[email protected]>
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions. |
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
a yaml cluster message
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.
The text was updated successfully, but these errors were encountered: