Class RedisProxy.ConnPoolSettings

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.ConnPoolSettings
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, RedisProxy.ConnPoolSettingsOrBuilder, Serializable
Enclosing class:
RedisProxy

public static final class RedisProxy.ConnPoolSettings extends com.google.protobuf.GeneratedMessageV3 implements RedisProxy.ConnPoolSettingsOrBuilder
 Redis connection pool settings.
 [#next-free-field: 11]
 
Protobuf type envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.ConnPoolSettings
See Also:
  • Field Details

    • OP_TIMEOUT_FIELD_NUMBER

      public static final int OP_TIMEOUT_FIELD_NUMBER
      See Also:
    • ENABLE_HASHTAGGING_FIELD_NUMBER

      public static final int ENABLE_HASHTAGGING_FIELD_NUMBER
      See Also:
    • ENABLE_REDIRECTION_FIELD_NUMBER

      public static final int ENABLE_REDIRECTION_FIELD_NUMBER
      See Also:
    • DNS_CACHE_CONFIG_FIELD_NUMBER

      public static final int DNS_CACHE_CONFIG_FIELD_NUMBER
      See Also:
    • MAX_BUFFER_SIZE_BEFORE_FLUSH_FIELD_NUMBER

      public static final int MAX_BUFFER_SIZE_BEFORE_FLUSH_FIELD_NUMBER
      See Also:
    • BUFFER_FLUSH_TIMEOUT_FIELD_NUMBER

      public static final int BUFFER_FLUSH_TIMEOUT_FIELD_NUMBER
      See Also:
    • MAX_UPSTREAM_UNKNOWN_CONNECTIONS_FIELD_NUMBER

      public static final int MAX_UPSTREAM_UNKNOWN_CONNECTIONS_FIELD_NUMBER
      See Also:
    • ENABLE_COMMAND_STATS_FIELD_NUMBER

      public static final int ENABLE_COMMAND_STATS_FIELD_NUMBER
      See Also:
    • READ_POLICY_FIELD_NUMBER

      public static final int READ_POLICY_FIELD_NUMBER
      See Also:
    • CONNECTION_RATE_LIMIT_FIELD_NUMBER

      public static final int CONNECTION_RATE_LIMIT_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • hasOpTimeout

      public boolean hasOpTimeout()
       Per-operation timeout in milliseconds. The timer starts when the first
       command of a pipeline is written to the backend connection. Each response received from Redis
       resets the timer since it signifies that the next command is being processed by the backend.
       The only exception to this behavior is when a connection to a backend is not yet established.
       In that case, the connect timeout on the cluster will govern the timeout until the connection
       is ready.
       
      .google.protobuf.Duration op_timeout = 1 [(.validate.rules) = { ... }
      Specified by:
      hasOpTimeout in interface RedisProxy.ConnPoolSettingsOrBuilder
      Returns:
      Whether the opTimeout field is set.
    • getOpTimeout

      public com.google.protobuf.Duration getOpTimeout()
       Per-operation timeout in milliseconds. The timer starts when the first
       command of a pipeline is written to the backend connection. Each response received from Redis
       resets the timer since it signifies that the next command is being processed by the backend.
       The only exception to this behavior is when a connection to a backend is not yet established.
       In that case, the connect timeout on the cluster will govern the timeout until the connection
       is ready.
       
      .google.protobuf.Duration op_timeout = 1 [(.validate.rules) = { ... }
      Specified by:
      getOpTimeout in interface RedisProxy.ConnPoolSettingsOrBuilder
      Returns:
      The opTimeout.
    • getOpTimeoutOrBuilder

      public com.google.protobuf.DurationOrBuilder getOpTimeoutOrBuilder()
       Per-operation timeout in milliseconds. The timer starts when the first
       command of a pipeline is written to the backend connection. Each response received from Redis
       resets the timer since it signifies that the next command is being processed by the backend.
       The only exception to this behavior is when a connection to a backend is not yet established.
       In that case, the connect timeout on the cluster will govern the timeout until the connection
       is ready.
       
      .google.protobuf.Duration op_timeout = 1 [(.validate.rules) = { ... }
      Specified by:
      getOpTimeoutOrBuilder in interface RedisProxy.ConnPoolSettingsOrBuilder
    • getEnableHashtagging

      public boolean getEnableHashtagging()
       Use hash tagging on every redis key to guarantee that keys with the same hash tag will be
       forwarded to the same upstream. The hash key used for determining the upstream in a
       consistent hash ring configuration will be computed from the hash tagged key instead of the
       whole key. The algorithm used to compute the hash tag is identical to the `redis-cluster
       implementation <https://redis.io/topics/cluster-spec#keys-hash-tags>`_.
      
       Examples:
      
       * '{user1000}.following' and '{user1000}.followers' **will** be sent to the same upstream
       * '{user1000}.following' and '{user1001}.following' **might** be sent to the same upstream
       
      bool enable_hashtagging = 2;
      Specified by:
      getEnableHashtagging in interface RedisProxy.ConnPoolSettingsOrBuilder
      Returns:
      The enableHashtagging.
    • getEnableRedirection

      public boolean getEnableRedirection()
       Accept `moved and ask redirection
       <https://redis.io/topics/cluster-spec#redirection-and-resharding>`_ errors from upstream
       redis servers, and retry commands to the specified target server. The target server does not
       need to be known to the cluster manager. If the command cannot be redirected, then the
       original error is passed downstream unchanged. By default, this support is not enabled.
       
      bool enable_redirection = 3;
      Specified by:
      getEnableRedirection in interface RedisProxy.ConnPoolSettingsOrBuilder
      Returns:
      The enableRedirection.
    • hasDnsCacheConfig

      public boolean hasDnsCacheConfig()
       If ``enable_redirection`` is set to true this option configures the DNS cache that the
       connection pool will use to resolve hostnames that are returned with MOVED and ASK responses.
       If no configuration is provided, DNS lookups will not be performed (and thus the MOVED/ASK errors
       will be propagated verbatim to the user).
       
      .envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig dns_cache_config = 9;
      Specified by:
      hasDnsCacheConfig in interface RedisProxy.ConnPoolSettingsOrBuilder
      Returns:
      Whether the dnsCacheConfig field is set.
    • getDnsCacheConfig

      public DnsCacheConfig getDnsCacheConfig()
       If ``enable_redirection`` is set to true this option configures the DNS cache that the
       connection pool will use to resolve hostnames that are returned with MOVED and ASK responses.
       If no configuration is provided, DNS lookups will not be performed (and thus the MOVED/ASK errors
       will be propagated verbatim to the user).
       
      .envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig dns_cache_config = 9;
      Specified by:
      getDnsCacheConfig in interface RedisProxy.ConnPoolSettingsOrBuilder
      Returns:
      The dnsCacheConfig.
    • getDnsCacheConfigOrBuilder

      public DnsCacheConfigOrBuilder getDnsCacheConfigOrBuilder()
       If ``enable_redirection`` is set to true this option configures the DNS cache that the
       connection pool will use to resolve hostnames that are returned with MOVED and ASK responses.
       If no configuration is provided, DNS lookups will not be performed (and thus the MOVED/ASK errors
       will be propagated verbatim to the user).
       
      .envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig dns_cache_config = 9;
      Specified by:
      getDnsCacheConfigOrBuilder in interface RedisProxy.ConnPoolSettingsOrBuilder
    • getMaxBufferSizeBeforeFlush

      public int getMaxBufferSizeBeforeFlush()
       Maximum size of encoded request buffer before flush is triggered and encoded requests
       are sent upstream. If this is unset, the buffer flushes whenever it receives data
       and performs no batching.
       This feature makes it possible for multiple clients to send requests to Envoy and have
       them batched- for example if one is running several worker processes, each with its own
       Redis connection. There is no benefit to using this with a single downstream process.
       Recommended size (if enabled) is 1024 bytes.
       
      uint32 max_buffer_size_before_flush = 4;
      Specified by:
      getMaxBufferSizeBeforeFlush in interface RedisProxy.ConnPoolSettingsOrBuilder
      Returns:
      The maxBufferSizeBeforeFlush.
    • hasBufferFlushTimeout

      public boolean hasBufferFlushTimeout()
       The encoded request buffer is flushed N milliseconds after the first request has been
       encoded, unless the buffer size has already exceeded ``max_buffer_size_before_flush``.
       If ``max_buffer_size_before_flush`` is not set, this flush timer is not used. Otherwise,
       the timer should be set according to the number of clients, overall request rate and
       desired maximum latency for a single command. For example, if there are many requests
       being batched together at a high rate, the buffer will likely be filled before the timer
       fires. Alternatively, if the request rate is lower the buffer will not be filled as often
       before the timer fires.
       If ``max_buffer_size_before_flush`` is set, but ``buffer_flush_timeout`` is not, the latter
       defaults to 3ms.
       
      .google.protobuf.Duration buffer_flush_timeout = 5;
      Specified by:
      hasBufferFlushTimeout in interface RedisProxy.ConnPoolSettingsOrBuilder
      Returns:
      Whether the bufferFlushTimeout field is set.
    • getBufferFlushTimeout

      public com.google.protobuf.Duration getBufferFlushTimeout()
       The encoded request buffer is flushed N milliseconds after the first request has been
       encoded, unless the buffer size has already exceeded ``max_buffer_size_before_flush``.
       If ``max_buffer_size_before_flush`` is not set, this flush timer is not used. Otherwise,
       the timer should be set according to the number of clients, overall request rate and
       desired maximum latency for a single command. For example, if there are many requests
       being batched together at a high rate, the buffer will likely be filled before the timer
       fires. Alternatively, if the request rate is lower the buffer will not be filled as often
       before the timer fires.
       If ``max_buffer_size_before_flush`` is set, but ``buffer_flush_timeout`` is not, the latter
       defaults to 3ms.
       
      .google.protobuf.Duration buffer_flush_timeout = 5;
      Specified by:
      getBufferFlushTimeout in interface RedisProxy.ConnPoolSettingsOrBuilder
      Returns:
      The bufferFlushTimeout.
    • getBufferFlushTimeoutOrBuilder

      public com.google.protobuf.DurationOrBuilder getBufferFlushTimeoutOrBuilder()
       The encoded request buffer is flushed N milliseconds after the first request has been
       encoded, unless the buffer size has already exceeded ``max_buffer_size_before_flush``.
       If ``max_buffer_size_before_flush`` is not set, this flush timer is not used. Otherwise,
       the timer should be set according to the number of clients, overall request rate and
       desired maximum latency for a single command. For example, if there are many requests
       being batched together at a high rate, the buffer will likely be filled before the timer
       fires. Alternatively, if the request rate is lower the buffer will not be filled as often
       before the timer fires.
       If ``max_buffer_size_before_flush`` is set, but ``buffer_flush_timeout`` is not, the latter
       defaults to 3ms.
       
      .google.protobuf.Duration buffer_flush_timeout = 5;
      Specified by:
      getBufferFlushTimeoutOrBuilder in interface RedisProxy.ConnPoolSettingsOrBuilder
    • hasMaxUpstreamUnknownConnections

      public boolean hasMaxUpstreamUnknownConnections()
       ``max_upstream_unknown_connections`` controls how many upstream connections to unknown hosts
       can be created at any given time by any given worker thread (see ``enable_redirection`` for
       more details). If the host is unknown and a connection cannot be created due to enforcing
       this limit, then redirection will fail and the original redirection error will be passed
       downstream unchanged. This limit defaults to 100.
       
      .google.protobuf.UInt32Value max_upstream_unknown_connections = 6;
      Specified by:
      hasMaxUpstreamUnknownConnections in interface RedisProxy.ConnPoolSettingsOrBuilder
      Returns:
      Whether the maxUpstreamUnknownConnections field is set.
    • getMaxUpstreamUnknownConnections

      public com.google.protobuf.UInt32Value getMaxUpstreamUnknownConnections()
       ``max_upstream_unknown_connections`` controls how many upstream connections to unknown hosts
       can be created at any given time by any given worker thread (see ``enable_redirection`` for
       more details). If the host is unknown and a connection cannot be created due to enforcing
       this limit, then redirection will fail and the original redirection error will be passed
       downstream unchanged. This limit defaults to 100.
       
      .google.protobuf.UInt32Value max_upstream_unknown_connections = 6;
      Specified by:
      getMaxUpstreamUnknownConnections in interface RedisProxy.ConnPoolSettingsOrBuilder
      Returns:
      The maxUpstreamUnknownConnections.
    • getMaxUpstreamUnknownConnectionsOrBuilder

      public com.google.protobuf.UInt32ValueOrBuilder getMaxUpstreamUnknownConnectionsOrBuilder()
       ``max_upstream_unknown_connections`` controls how many upstream connections to unknown hosts
       can be created at any given time by any given worker thread (see ``enable_redirection`` for
       more details). If the host is unknown and a connection cannot be created due to enforcing
       this limit, then redirection will fail and the original redirection error will be passed
       downstream unchanged. This limit defaults to 100.
       
      .google.protobuf.UInt32Value max_upstream_unknown_connections = 6;
      Specified by:
      getMaxUpstreamUnknownConnectionsOrBuilder in interface RedisProxy.ConnPoolSettingsOrBuilder
    • getEnableCommandStats

      public boolean getEnableCommandStats()
       Enable per-command statistics per upstream cluster, in addition to the filter level aggregate
       count. These commands are measured in microseconds.
       
      bool enable_command_stats = 8;
      Specified by:
      getEnableCommandStats in interface RedisProxy.ConnPoolSettingsOrBuilder
      Returns:
      The enableCommandStats.
    • getReadPolicyValue

      public int getReadPolicyValue()
       Read policy. The default is to read from the primary.
       
      .envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.ConnPoolSettings.ReadPolicy read_policy = 7 [(.validate.rules) = { ... }
      Specified by:
      getReadPolicyValue in interface RedisProxy.ConnPoolSettingsOrBuilder
      Returns:
      The enum numeric value on the wire for readPolicy.
    • getReadPolicy

       Read policy. The default is to read from the primary.
       
      .envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.ConnPoolSettings.ReadPolicy read_policy = 7 [(.validate.rules) = { ... }
      Specified by:
      getReadPolicy in interface RedisProxy.ConnPoolSettingsOrBuilder
      Returns:
      The readPolicy.
    • hasConnectionRateLimit

      public boolean hasConnectionRateLimit()
       Ops or connection timeout triggers reconnection to redis server which could result in reconnection
       storm to busy redis server. This config is a protection to rate limit reconnection rate.
       If not set, there will be no rate limiting on the reconnection.
       
      .envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.ConnectionRateLimit connection_rate_limit = 10;
      Specified by:
      hasConnectionRateLimit in interface RedisProxy.ConnPoolSettingsOrBuilder
      Returns:
      Whether the connectionRateLimit field is set.
    • getConnectionRateLimit

      public RedisProxy.ConnectionRateLimit getConnectionRateLimit()
       Ops or connection timeout triggers reconnection to redis server which could result in reconnection
       storm to busy redis server. This config is a protection to rate limit reconnection rate.
       If not set, there will be no rate limiting on the reconnection.
       
      .envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.ConnectionRateLimit connection_rate_limit = 10;
      Specified by:
      getConnectionRateLimit in interface RedisProxy.ConnPoolSettingsOrBuilder
      Returns:
      The connectionRateLimit.
    • getConnectionRateLimitOrBuilder

      public RedisProxy.ConnectionRateLimitOrBuilder getConnectionRateLimitOrBuilder()
       Ops or connection timeout triggers reconnection to redis server which could result in reconnection
       storm to busy redis server. This config is a protection to rate limit reconnection rate.
       If not set, there will be no rate limiting on the reconnection.
       
      .envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.ConnectionRateLimit connection_rate_limit = 10;
      Specified by:
      getConnectionRateLimitOrBuilder in interface RedisProxy.ConnPoolSettingsOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static RedisProxy.ConnPoolSettings parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RedisProxy.ConnPoolSettings parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RedisProxy.ConnPoolSettings parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RedisProxy.ConnPoolSettings parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RedisProxy.ConnPoolSettings parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RedisProxy.ConnPoolSettings parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RedisProxy.ConnPoolSettings parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static RedisProxy.ConnPoolSettings parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static RedisProxy.ConnPoolSettings parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static RedisProxy.ConnPoolSettings parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static RedisProxy.ConnPoolSettings parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static RedisProxy.ConnPoolSettings parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public RedisProxy.ConnPoolSettings.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static RedisProxy.ConnPoolSettings.Builder newBuilder()
    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected RedisProxy.ConnPoolSettings.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static RedisProxy.ConnPoolSettings getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<RedisProxy.ConnPoolSettings> parser()
    • getParserForType

      public com.google.protobuf.Parser<RedisProxy.ConnPoolSettings> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public RedisProxy.ConnPoolSettings getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder