DEV Community

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

Collapse
 
blusk profile image
Blusk

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).