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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration of gRPC MAX_CONNECTION_AGE and MAX_CONNECTION_AGE_GRACE #2999

Closed
slashvar opened this issue Mar 4, 2024 · 1 comment 路 Fixed by #3121
Closed

Configuration of gRPC MAX_CONNECTION_AGE and MAX_CONNECTION_AGE_GRACE #2999

slashvar opened this issue Mar 4, 2024 · 1 comment 路 Fixed by #3121
Assignees
Labels
enhancement New feature or request grpc java Pull requests that update Java code p1 mid priority
Milestone

Comments

@slashvar
Copy link

slashvar commented Mar 4, 2024

馃殌 The feature

Expose in the torchserve configuration the following server-side gRPC settings:

  • MAX_CONNECTION_AGE : the maximum age of keep alive connections
  • MAX_CONNECTION_AGE_GRACE : the grace period to avoid unavailable service when reaching the max connection age.

Both values can be set in the NettyServerBuilder class (see https://grpc.github.io/grpc-java/javadoc/io/grpc/netty/NettyServerBuilder.html#maxConnectionAge(long,java.util.concurrent.TimeUnit) )

Motivation, pitch

In context of load balanced torchserve instances, keeping connections alive too long will block clients on one instance. Setting the max connection age allow to force client to renew their connections on a regular basis and thus to connect to another instance.

Usage and rational of those settings are described here: https://github.com/grpc/proposal/blob/master/A9-server-side-conn-mgt.md

Alternatives

Connection age is not available on client side, thus the only solution is to force a renew of the client connections using a timer.

Additional context

No response

@agunapal agunapal added enhancement New feature or request java Pull requests that update Java code labels Mar 5, 2024
@bjfletcher
Copy link

Someone asked a similar question https://discuss.pytorch.org/t/torchserve-grpc-configuration-options-for-client-side-load-balancing/133218

@lxning lxning added grpc p1 mid priority labels Mar 5, 2024
@lxning lxning added this to the v0.10.1 milestone Mar 5, 2024
@lxning lxning added this to Backlog in v0.11.0 lifecycle Mar 5, 2024
@lxning lxning added this to Done in v0.10.0 lifecycle Mar 5, 2024
@lxning lxning moved this from Done to Backlog in v0.10.0 lifecycle Mar 5, 2024
@lxning lxning removed this from Backlog in v0.10.0 lifecycle Mar 5, 2024
@namannandan namannandan moved this from Backlog to In progress in v0.11.0 lifecycle Apr 26, 2024
@namannandan namannandan moved this from In progress to In Review in v0.11.0 lifecycle Apr 29, 2024
@namannandan namannandan moved this from In Review to Done in v0.11.0 lifecycle May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request grpc java Pull requests that update Java code p1 mid priority
Projects
Development

Successfully merging a pull request may close this issue.

5 participants