You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Depending on particular user cases of gRPC server there might be (and there are in fact) cases where hard-coded 30 seconds is not enough to gracefully terminate currently open connections. This value better be customizable and left up to the library users to decide how long it should wait before forcible closing the connections.
In Network.GRPC.LowLevel.Server module (core/src/Network/GRPC/LowLevel/Server.hs file) in stopServer function there is this line:
shutdownEvent <- pluck scq shutdownTag (Just30)
Here 30 seconds timeout is hard-coded. I guess Server data-type of this module can be extended to hold time graceful termination timeout value to use for that pluck function.
This value can be added to Network.GRPC.HighLevel.Generated.ServiceOptions data type and this 30 seconds can be set as default for Network.GRPC.HighLevel.Generated.defaultServiceOptions so there a user would customize the value. And then at some point it would be passed to the Server (probably to ServerConfig first?).
The text was updated successfully, but these errors were encountered:
@unclechu this sounds like a useful change! Thanks for documenting it :)
We're very busy within Arista at the moment so we're unlikely to get to this unless this became a blocker for someone. We're very open to contributions though, so if you implement this for yourself, please consider making it a pull request!
Depending on particular user cases of gRPC server there might be (and there are in fact) cases where hard-coded 30 seconds is not enough to gracefully terminate currently open connections. This value better be customizable and left up to the library users to decide how long it should wait before forcible closing the connections.
In
Network.GRPC.LowLevel.Server
module (core/src/Network/GRPC/LowLevel/Server.hs
file) instopServer
function there is this line:Here 30 seconds timeout is hard-coded. I guess
Server
data-type of this module can be extended to hold time graceful termination timeout value to use for thatpluck
function.This value can be added to
Network.GRPC.HighLevel.Generated.ServiceOptions
data type and this 30 seconds can be set as default forNetwork.GRPC.HighLevel.Generated.defaultServiceOptions
so there a user would customize the value. And then at some point it would be passed to theServer
(probably toServerConfig
first?).The text was updated successfully, but these errors were encountered: