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 GRPC keepalives back #214

Merged
merged 4 commits into from
May 2, 2024
Merged

Add GRPC keepalives back #214

merged 4 commits into from
May 2, 2024

Conversation

neekolas
Copy link
Contributor

@neekolas neekolas commented May 2, 2024

tl;dr

Copy link

changeset-bot bot commented May 2, 2024

🦋 Changeset detected

Latest commit: fb2a9cd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@xmtp/grpc-api-client Patch
@xmtp/bot-kit-pro Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@neekolas neekolas marked this pull request as ready for review May 2, 2024 20:50
@neekolas neekolas changed the title Add GRPC timeouts back Add GRPC keepalives back May 2, 2024
@neekolas neekolas requested a review from fabriguespe as a code owner May 2, 2024 21:18
@neekolas neekolas requested a review from alexrisch May 2, 2024 21:20
local: "localhost:5556",
}

const SLEEP_TIME = 1000
const MAX_RETRIES = 4

const clientOptions = {
"grpc.keepalive_timeout_ms": 1000 * 10, // 10 seconds
"grpc.keepalive_time_ms": 1000 * 30, // 30 seconds
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I understand the relationship between these and the 15 second timeout on the nodes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

15 second on the node is the floor that the node will allow before it gets angry. We don't need 15 seconds on servers where we have pretty reliable internet. It's helpful on the phone where the keepalives can help detect connection drops.

Arguably even 30 seconds is needlessly low. The reports of connection failures happen around the 5 minute mark.

@neekolas neekolas merged commit d565b7e into main May 2, 2024
2 checks passed
@neekolas neekolas deleted the nm/add-grpc-timeouts branch May 2, 2024 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants