eclipse-vertx / vertx-grpc

Development of the gRPC component for Eclipse Vert.x
Eclipse Public License 2.0
37 stars 23 forks source link

Add support for keep-alive-time parameter #74

Open cescoffier opened 8 months ago

cescoffier commented 8 months ago

The Netty variant of the gRPC server allows configuring the keep-alive-time. However, the Vert.x variant does not.

Related to: https://github.com/quarkusio/quarkus/issues/36033

vietj commented 8 months ago

which keep alive are we talking about ? HTTP/2 ? it is not clear

cescoffier commented 8 months ago

In the NettyChannelBuilder, you have the io.grpc.netty.NettyChannelBuilder#keepAliveTime with the following javadoc:

Sets the time without read activity before sending a keepalive ping. An unreasonably small value might be increased, and Long.MAX_VALUE nano seconds or an unreasonably large value will disable keepalive. Defaults to infinite. Clients must receive permission from the service owner before enabling this option. Keepalives can increase the load on services and are commonly "invisible" making it hard to notice when they are causing excessive load. Clients are strongly encouraged to use only as small of a value as necessary

Basically the time between pings.

Do we have the equivalent method in the pure Vert.x variant?

vietj commented 8 months ago

assuming HTTP/2 ping ?

cescoffier commented 8 months ago

Yes, Http/2 pings.

vietj commented 8 months ago

It seems that it periodically sends a ping HTTP/2 frame to the server to "keep alive" the stream. We could develop a similar feature for the new client on top of Vert.x HTTP/2 connection ping feature.

vietj commented 8 months ago

https://grpc.io/docs/guides/keepalive/

ThoSap commented 3 weeks ago

Is this still planned to be worked on?

vietj commented 3 weeks ago

it is actually not defined what this means, if that is defined then we can tell whether or not it will be planned