Class ServiceConfig.RetryThrottlingPolicy.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, ServiceConfig.RetryThrottlingPolicyOrBuilder, Cloneable
    Enclosing class:
    ServiceConfig.RetryThrottlingPolicy

    public static final class ServiceConfig.RetryThrottlingPolicy.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<ServiceConfig.RetryThrottlingPolicy.Builder>
    implements ServiceConfig.RetryThrottlingPolicyOrBuilder
     If a RetryThrottlingPolicy is provided, gRPC will automatically throttle
     retry attempts and hedged RPCs when the client's ratio of failures to
     successes exceeds a threshold.
     For each server name, the gRPC client will maintain a token_count which is
     initially set to max_tokens. Every outgoing RPC (regardless of service or
     method invoked) will change token_count as follows:
       - Every failed RPC will decrement the token_count by 1.
       - Every successful RPC will increment the token_count by token_ratio.
     If token_count is less than or equal to max_tokens / 2, then RPCs will not
     be retried and hedged RPCs will not be sent.
     
    Protobuf type grpc.service_config.ServiceConfig.RetryThrottlingPolicy