-
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
ProxyProtocolUpstream Transport socket should support connection pool setting #37126
Comments
Which TLV will be used as key? There can be multiple TLVs in the header. |
I think the short answer is all the TLVs. |
Let me know if you have cases that selecting subset of TLVs |
Actually, the best way to decribe the feature 1 is to allow LOCAL address along with TLVs. Currently TLVs is not attached to the PP header if the address is local. envoy/source/extensions/transport_sockets/proxy_protocol/proxy_protocol.cc Lines 91 to 103 in 3bf801c
|
I do not have specific use cases, just asking clarifying questions. The feature looks ok to me. |
Thank you @yanavlasov |
Context: envoyproxy#37126 ConnectionPoolSettings in proxy_protocol upstream socket customizes the behavior of connection pool. Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Context: envoyproxy#37126 ConnectionPoolSettings in proxy_protocol upstream socket customizes the behavior of connection pool. Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Title: ProxyProtocolUpstream Transport socket should support connection pool setting
Description:
Currently
ProxyProtocolUpstreamTransport
hard coded connection pool key as "src_address" + "dst_address" and require both address not null.However, per Proxy protocol v2, UNSPEC address is supported.
This limitation blocks from using proxy protocol carrying arbitrary per connection metadata via proxy protocol TLV
Problem 1:
Although we can populate src address and dst address by authentic address, the fact that addresses participating connection pool hashkey would create unnecessary connection pool.
The best approach is to allow UNSPEC address that does not take address into connection pool.
Problem 2:
TLV is not involved in connection pool.
That means a connection created with metadata "foo" share the same connection pool with connection annotated metadata "bar".
That's a hard failure in some use cases.
Proposal
A zero initialized ConnectionPoolSetting should maintain the current behavior.
Let me know if the API make sense.
I have the implementation running well at my side. If anyone is feeling useful, l can create the PR for the API and the follow up implementation.
Thank you!
Ref
proxy protocol: https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt
The text was updated successfully, but these errors were encountered: