-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce TCP keepalive configuration (#186)
* Add logging to proxy::tcp * update rust version in dockerfile * Introduce TCP keepalive configuration In some network environments, peers may silently drop connections such that the proxy cannot detect that the peer's socket has been closed. The [TCP keepalive socket options][tcp-keepalive] configures the kernel to actively probe connections to ensure connectivity and prevent idle timeouts. This change adds stack modules that attempt to configure accept and connect sockets' TCP keepalive socket options. There are four new environment configurations the proxy supports: - `LINKERD2_PROXY_INBOUND_ACCEPT_KEEPALIVE` - `LINKERD2_PROXY_OUTBOUND_ACCEPT_KEEPALIVE` - `LINKERD2_PROXY_INBOUND_CONNECT_KEEPALIVE` - `LINKERD2_PROXY_OUTBOUND_CONNECT_KEEPALIVE` When an environment variable is unset, no keepalive is set on the corresponding sockets. Otherwise, its value is parsed as a duration. OSes may or may not understand subsecond values. It is recommended to only set the inbound-accept and outbound-connect keepalive values, as keepalives shouldn'tbe necessary on localhost. Relates to linkerd/linkerd2#1949 linkerd/linkerd2#2182 [tcp-keepalive]: http://www.tldp.org/HOWTO/TCP-Keepalive-HOWTO/overview.html * Use smarter controller keepalives For the controller's pods, it may not make sense to use the outbound keepalive when commuciating with the proxy api, because this API may be served on localhost. If the controller's address is localhost/loopback, then use the inbound connect keepalive instead.
- Loading branch information
Showing
14 changed files
with
375 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.