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

client: Add keepalive to signer, scheduler and node connections #220

Merged
merged 6 commits into from Jul 23, 2023

Conversation

cdecker
Copy link
Collaborator

@cdecker cdecker commented Jul 20, 2023

Allows us to passively detect that we lost a connection after 90s. While not quite usable for interactive scenarios (signer in keep alive timeout, client is waiting on signatures), it is useful for the standard case where the signer lost the connection while waiting for the node to get scheduled.

A deeper integration with the host's sleep state, restarting the signer when we come back from suspension for example, can be a complementary technique to address those interactive scenarios.

Closes #209

We can't clean if we use the bind mount directly.
Tonic allows us to setup keep alive messages in order to detect silent
disconnections. We set up a conservative keepalive of 30s and a
timeout of 90s. This should allow signers and clients to discover that
they got disconnected (eventually) and re-connect, either to the node
or the scheduler.

Closes #209
This should allow us to better help users that are in trouble by
detecting the exact version of the code they were running. Logging to
stdout also does not leak these details to the service operators.
@cdecker cdecker merged commit 2563af2 into main Jul 23, 2023
7 checks passed
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.

Signer run_forever hang at some point
1 participant