Hi,
We're happily using gRPC in production, and it is a breathe of fresh air for providing public APIs to users (when combined with
gRPC Gateway).
We've recently introduced rate limiting on our APIs, that respond that returns a Status.UNAVAILABLE on calls that are limited (we did consider Status.RESOURCE_EXHAUSTED, but we also use it for APIs with quota, where immediate retries won't help). Unfortunately, while the server-side implementation is easy, the client side became really messy.
We have to manually wrap all calls in backoff retry strategies. This is especially painful for streaming calls. While there is work related to connectitivty retries (
https://github.com/grpc/grpc/issues/5377), there is absolutely no logic around retries based on responses. Having to write backoff strategies in user application logic, makes the logic polluted with something that is otherwise networking code.
Is gRPC planning some form of support for application-level retries? Maybe a RetryPolicy that can be injected into a Stub on creation?
Cheers,
Michal
Head of Infrastructure
Improbable