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

Reusing connections on the client #57

Open
wokalski opened this issue Apr 26, 2024 · 0 comments
Open

Reusing connections on the client #57

wokalski opened this issue Apr 26, 2024 · 0 comments

Comments

@wokalski
Copy link
Contributor

wokalski commented Apr 26, 2024

ocaml-h2 does not implement goaway so it's difficult to reasonably handle rolling upgrades of gRPC servers the client is connected to. Until that is supported I am not keen to implement a higher level client abstraction.

We could use some heuristics such as rotating the connections after some time period. It's TBD but maybe such heuristics will need to be implemented anyway to be able to handle servers that don't send goaways that way.

FWIW most common implementations (i.e. the official ones) leverage GOAWAY. The first go away on sigterm and the other one when the connection si actually shutting down.

When we can intercept GOAWAYs on the client side we will be able to mark a given connection as not reusable without disrupting existing streams on that connection for a graceful shutdown procedure.

The higher level client abstraction will also need to support the following:

  1. Keepalive/ping behavior
  2. max concurrent streams
  3. Reconnects
  4. Checking readiness of the client (i.e. can it be used or not? for example the server might be down temporarily)
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

No branches or pull requests

1 participant