Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Server/client: Add keepalive to RPC connections #1735

Merged
merged 2 commits into from Jun 30, 2021
Merged

Conversation

catsby
Copy link
Member

@catsby catsby commented Jun 29, 2021

Depending on the environment, certain network load balancers et. al. may terminate idle connections if no activity is detected after some time. EKS specifically uses a classic load balancer for the Waypoint server service and will by default terminate connections after 60s of inactivity. This results in the waypoint runner crash loop shown in #1398.

In this PR we configure keepalive properties on both the server and the client, to maintain the connection even if there is no activity in the stream. I believe these are the only 2 locations where the client is created, but please let me know if I missed on.

*Note: the numbers used here are fairly arbitrary and worked for AWS EKS. The client Time has a minimum of 10s. From my testing it needs to be greater than the server enforcement's MinTime.

Fixes #1398

@github-actions github-actions bot added the core label Jun 29, 2021
@denysvitali
Copy link
Contributor

This is awesome! Thanks for fixing!

We had a similar issue in our environment and our limits were even lower (NGINX's default is 30s IIRC), thus this was causing a lot of disconnections from the runners. We "worked around" the problem by increasing the connection timeout limit, but obviously your proposal is much, much better!

Copy link
Contributor

@mitchellh mitchellh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, I didn't test it or anything but this looks good to me on the surface.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WP on AWS EKS results in CrashLoopBackoff
4 participants