Skip to content
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

Add keepalive setting in client library. #408

Closed
sushanb opened this issue Sep 3, 2020 · 0 comments · Fixed by #409
Closed

Add keepalive setting in client library. #408

sushanb opened this issue Sep 3, 2020 · 0 comments · Fixed by #409
Assignees
Labels
api: bigtable Issues related to the googleapis/java-bigtable API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@sushanb
Copy link
Contributor

sushanb commented Sep 3, 2020

Java grpc does not have keepalive configuration by default. It will use the kernel tcp default configuration as the values

sysctl -a | grep tcp
net.netfilter.nf_conntrack_tcp_timeout_max_retrans = 300
net.netfilter.nf_conntrack_tcp_timeout_unacknowledged = 300
net.ipv4.tcp_keepalive_time = 7200

Vals in seconds

Why Keepalive in GRPC Client

Keepalive is recommended to use when your peer dies before it is able to notify you or does not notify you. The reasons can be kernel panic, termination of the process handling that pee

Hence, if a server does not send GOAWAY to the client, the grpc client will send packets to the TCP peer but the TCP perr will not send any packets. This can happen when a server nodes goes down due to machine failure, release/rollouts.

As you noticed the tcp (unacknowledged , keepalive) times are in 5 mins and 2 hours, so the reasonable solution will be to add keepalive logic in client library.

Steps to reproduce

To reproduce the problem, run the following command on a gRPC client host:

iptables -I INPUT -s <server-ip> -p tcp --sport <server-port> -j DROP
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the googleapis/java-bigtable API. label Sep 3, 2020
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Sep 4, 2020
@kolea2 kolea2 added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/java-bigtable API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants