Redis Configuration

    RedisDestination defines policies that apply to redis traffic intended for a redis service

    RedisDestination defines policies that apply to redis traffic intended for a redis service

    ConnectionPoolSettings

    Connection pool settings for an upstream host. The settings apply to each individual host in the upstream service.

    FieldTypeDescriptionRequired
    tcpNo
    redisRedisSettingsNo

    Auth

    Auth provide a way to get redis auth token.

    FieldTypeDescriptionRequired
    secretSecretReference (oneof)

    Secret use the k8s secret in current namespace.

    No
    plain

    redis password.

    No

    SecretReference

    FieldTypeDescriptionRequired
    namestringNo
    passwordFieldstringNo
    usernameFieldstringNo

    PlainAuth

    FieldTypeDescriptionRequired
    passwordstringYes
    usernamestringNo

    RedisSettings

    FieldTypeDescriptionRequired
    modeNo
    authAuthNo
    discoveryEndpointsstring[]No

    TrafficPolicy

    FieldTypeDescriptionRequired
    connectionPoolConnectionPoolSettingsNo

    RedisService

    RedisService provide a way to config redis service in service mesh.

    FieldTypeDescriptionRequired
    hoststring[]Yes
    settingsSettingsNo
    redisYes
    faultsFault[]

    List of faults to inject. Faults currently come in two flavors: - Delay, which delays a request. - Error, which responds to a request with an error. Errors can also have delays attached.

    No

    Percent specifies a percentage in the range of [0.0, 100.0].

    Fault

    Fault defines redis faults used for fault injection.

    FieldTypeDescriptionRequired
    typeType

    Fault type.

    No

    Percentage of requests fault applies to.

    No
    delayDurationNo
    commandsstring[]

    Commands fault is restricted to, if any. If not set, fault applies to all commands other than auth and ping (due to special handling of those commands in Envoy).

    No

    RedisService.Settings

    FieldTypeDescriptionRequired
    caseInsensitivebool

    Indicates that prefix matching should be case insensitive.

    No
    opTimeoutDuration

    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.

    No
    enableCommandStatsbool

    Enable per-command statistics per upstream cluster, in addition to the filter level aggregate count

    No
    maxBufferSizeBeforeFlushuint32

    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.

    No
    bufferFlushTimeout

    The encoded request buffer is flushed N milliseconds after the first request has been encoded, unless the buffer size has already exceeded maxbuffer_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.

    No
    maxUpstreamUnknownConnectionsUInt32Value

    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.

    No
    enableHashtaggingbool

    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 <;.

    Examples:

    • ’{user1000}.following’ and ‘{user1000}.followers’ will be sent to the same upstream
    No
    enableRedirectionbool

    Accept moved and ask redirection <https://redis.io/topics/cluster-spec#redirection-and-resharding&gt;_ 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.

    No
    readPolicy

    Read policy. The default is to read from the primary.

    No
    authAuth

    Downstream auth.

    No

    RedisService.KeyMatch

    FieldTypeDescriptionRequired
    prefixstring

    String prefix that must match the beginning of the keys. Envoy will always favor the longest match.

    No
    removePrefixbool

    Indicates if the prefix needs to be removed from the key when forwarded.

    No

    RedisService.RouteMatch

    FieldTypeDescriptionRequired
    keyNo

    RedisService.Destination

    FieldTypeDescriptionRequired
    hoststringYes
    uint32No

    RedisService.Mirror

    FieldTypeDescriptionRequired
    routeDestinationNo
    percentageNo
    excludeReadCommandsboolNo

    RedisService.Route

    FieldTypeDescriptionRequired
    matchNo
    routeDestinationNo
    mirrorNo

    Wrapper message for uint32.

    The JSON representation for UInt32Value is JSON number.

    RedisSettings.Mode

    NameDescription
    PROXY
    CLUSTER

    RedisSettings.Mode

    NameDescription
    PROXY
    CLUSTER

    RedisService.ReadPolicy

    NameDescription
    MASTER
    PREFER_MASTER
    REPLICA
    PREFER_REPLICA
    ANY

    Fault.Type

    NameDescription
    DELAY

    Delays requests. This is the base fault; other faults can have delays added.

    ERROR

    Returns errors on requests.

    Fault.Type

    NameDescription
    DELAY

    Delays requests. This is the base fault; other faults can have delays added.

    ERROR

    Returns errors on requests.

    Fault.Type

    NameDescription
    DELAY

    Delays requests. This is the base fault; other faults can have delays added.

    ERROR

    Returns errors on requests.

    RedisService.ReadPolicy

    NameDescription
    MASTER
    PREFER_MASTER
    REPLICA
    PREFER_REPLICA
    ANY