DEV Community

Discussion on: Introducing hRPC: a simple RPC system for user-facing APIs

Collapse
 
ahmetb profile image
Ahmet Alp Balkan

Janet, do you mind elaborating why NGINX's gRPC module could not handle disconnects/reconnects on idle connections? AFAIK that's what the gRPC module is supposed to do. Furthermore, there are reconnect settings in gRPC I think (github.com/grpc/grpc/blob/master/d...). So I am trying to understand what prompted you to create hRPC from this perspective.

Collapse
 
blusk profile image
Blusk Harmony Development

NGINX's gRPC module has an issue that requires a long keepalive to be set to ensure long streams stay open. Reconnects may be a good short-term solution, but ultimately during the time the client remains disconnected, events may be missed which means that the state of the application would need to be entirely invalidated. With WebSockets as the streaming method, there are no disconnects and do not require you to specify a keepalive timeout. In addition, gRPC has other load balancing complexities that can cause problems (mainly that connections are sticky and reused for as long as possible).