diff --git a/client/config.go b/client/config.go index 1dc1789c..4386d672 100644 --- a/client/config.go +++ b/client/config.go @@ -147,7 +147,7 @@ func (c *Config) getDialOption() []grpc.DialOption { return 60 * time.Millisecond * time.Duration(math.Pow(3, float64(attempt))) }), grpc_retry.WithCodes(codes.Unavailable, codes.ResourceExhausted)), - RetryOnRateLimitInterceptor(10, func(ctx context.Context, attempt uint) time.Duration { + RetryOnRateLimitInterceptor(75, func(ctx context.Context, attempt uint) time.Duration { return 10 * time.Millisecond * time.Duration(math.Pow(3, float64(attempt))) }), )) diff --git a/client/rate_limit_interceptor.go b/client/rate_limit_interceptor.go index d59f8475..c8d112e4 100644 --- a/client/rate_limit_interceptor.go +++ b/client/rate_limit_interceptor.go @@ -37,7 +37,7 @@ const ( RetryOnRateLimit ctxKey = iota ) -var MaxBackOff = 60 * time.Second +var MaxBackOff = 3 * time.Second // RetryOnRateLimitInterceptor returns a new retrying unary client interceptor. func RetryOnRateLimitInterceptor(maxRetry uint, backoffFunc grpc_retry.BackoffFuncContext) grpc.UnaryClientInterceptor {