Performing retries with ruby gRPC

Viewed 164

I'm running a ruby app that uses gRPC to communicate with other services and am leveraging the gruf gem for gRPC interactions.

I'm running into an issue where occasional resourcing issues cause gRPC calls to fail with GRPC::Unavailable: 14:Connection reset by peer. I'm attempting to implement a retry mechanisim, but it does not look like the ruby gRPC implementation has one available. I've looked at building a custom ClientInterpreter to perform a retry, but yielding multiple times in a ClientInterpreter results in a GRPC::Core::CallError: attempting to re-run a call error. Is there a recommended way to do retries using gRPC in ruby? Do I need to resort to writing in app code outside the gRPC/gruf ecosystem?

0 Answers
Related