Skip to content

Reusing connections on the client #57

@wokalski

Description

@wokalski

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions