-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Set HTTP2 keepalive timeout and interval via env in proxy container #12269
Comments
@UsingCoding Thanks for pointing this out. The proxy already supports In the original PR you reference, these values were used to configure the h2 keepalives. It appears that, at some point, there was a regression that lost that configuration. Would it be suitable to restore that behavior without introducing new configurations? |
@olix0r there is several points why i added new configurations:
If it's necessary to restore previous behavior(I don't have enough information to make a judgment) for configuration we can make some tricks:
In my opinion, this is not so important - after all, the behavior has been lost for a long time and there were no recovery requests, perhaps such behavior was not expected for the end user of the proxy. @olix0r it's up to you to decide(restore or not) - on your decision I'll make edits to PR |
@olix0r I supported the behavior of putting variables as in PR, leaving support for new variables( So I also removed the keepalive timeout and intervals to the control plane(which added by myself). Since the same timeouts as between proxy containers are not suitable for connections to the control plane |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
After additional exploration about gRPC keepalive i came to conclusion: gRPC keepalive are not suitable for linkerd as service mesh and may be potentially dangerous. Why it's dangerous: So, having gRPC Keepalive in linkerd when it used as Service Mesh is dangerous and should not be implemented. |
What problem are you trying to solve?
When linkerd2 is used for proxying HTTP/2 (gRPC) traffic there is maybe issue with tcp sockets dangling. In this case HTTP/2 ping frames or keepalive messages can help with it.
gRPC documentation for keepalive messages
In linkerd2-proxy setting keepalive timeout and interval already implemented here: issue and pull-request. It's implemened in 2020, but now in proxy source code there is no way to set up keepalive via env.
I found that keepalive can be setup in
h2::Settings
but the code that configures theh2::Settings
from environment variables (linkerd/app/src/env.rs
) does not set the parameterkeepalive_timeout
.Which means - there is no ping frames sent by linkerd-proxy intentionally and there is no way to configure it
How should the problem be solved?
Linkerd2-proxy should have env variables to configure keepalive timeout and interval.
Something like this:
LINKERD2_PROXY_INBOUND_HTTP2_KEEPALIVE_INTERVAL
LINKERD2_PROXY_OUTBOUND_HTTP2_KEEPALIVE_INTERVAL
LINKERD2_PROXY_INBOUND_HTTP2_KEEPALIVE_TIMEOUT
LINKERD2_PROXY_OUTBOUND_HTTP2_KEEPALIVE_TIMEOUT
Any alternatives you've considered?
I don't have
How would users interact with this feature?
Manual set up env variable in proxy container or in inject chart config
Would you like to work on this feature?
yes
The text was updated successfully, but these errors were encountered: