Replies: 3 comments 1 reply
-
@bestbeforetoday @mbwhite , |
Beta Was this translation helpful? Give feedback.
-
gRPC keep-alive configuration and uses are described in the gRPC documentation. Depending on whether you want to see and handle transient connection failures in your application code, you might also consider wait-for-ready configuration. You should always configure appropriate deadlines for invocations, either defaults on the Gateway connect (Go, Node, Java) or per-call (Go, Node, Java), but this becomes even more important if using wait-for-ready otherwise a request to an uncontactable Gateway will block indefinitely. The bottom of this page from the full-stack-asset-transfer-guide sample has some discussion of fail-over / load balancing options. |
Beta Was this translation helpful? Give feedback.
-
Hi @bestbeforetoday, Thanks a lot for the sugesstion.
But how will the wait-for-ready be incorporated, as according to a discussion I read on #197, what if at the time of checking the connection was there and after that, we're facing connection issues? According to my understanding the code would be something like-
|
Beta Was this translation helpful? Give feedback.
-
I'm new to navigating Hyperledger Fabric and Grpc connections, and I'd appreciate some guidance on the recommended approach for new development in this environment.
Let's say I have 2-3 peers set up on a Kubernetes cluster, and I've established a Service URL of load balancer (SVC URL) to connect to the gateway.
There are essentially two strategies to consider:
Initially, I lean towards the latter option. However, in scenarios where a peer goes offline or there's a disruption in the connection, I'm curious about strategies to minimize downtime. I've considered adjusting parameters such as grpc.keepalive_time_ms, grpc.keepalive_timeout_ms, grpc.max_connection_age_ms, and grpc.max_connection_idle_ms for potential improvements.
Unfortunately, I've found limited documentation or guidance on optimizing these parameters. Currently, it seems that without specific values provided, connections may persist indefinitely or not handle reconnection attempts adequately.
What would be the recommended approach to address this? Considering that setting up a GRPC connection entails time, and minimizing latency is crucial, how can we optimize connection management without compromising on system reliability or encountering excessive downtime?
Even in this link, nothing seems to be concluded. #197
Beta Was this translation helpful? Give feedback.
All reactions