Redis Cluster Configuration

This extension may be referenced by the qualified name envoy.clusters.redis

Note

This extension is not hardened and should only be used in deployments where both the downstream and upstream are trusted.

Tip

This extension extends and can be used with the following extension category:

This cluster adds support for Redis Cluster, as part of Envoy’s support for Redis Cluster.

Redis Cluster is an extension of Redis which supports sharding and high availability (where a shard that loses its primary fails over to a replica, and designates it as the new primary). However, as there is no unified frontend or proxy service in front of Redis Cluster, the client (in this case Envoy) must locally maintain the state of the Redis Cluster, specifically the topology. A random node in the cluster is queried for the topology using the CLUSTER SLOTS command. This result is then stored locally, and updated at user-configured intervals.

Additionally, if enable_redirection is true, then moved and ask redirection errors from upstream servers will trigger a topology refresh when they exceed a user-configured error threshold.

Example:

  1. name: name
  2. connect_timeout: 0.25s
  3. dns_lookup_family: V4_ONLY
  4. hosts:
  5. - socket_address:
  6. address: foo.bar.com
  7. port_value: 22120
  8. cluster_type:
  9. name: envoy.clusters.redis
  10. typed_config:
  11. "@type": type.googleapis.com/google.protobuf.Struct
  12. value:
  13. cluster_refresh_rate: 30s
  14. cluster_refresh_timeout: 0.5s
  15. redirect_refresh_interval: 10s
  16. redirect_refresh_threshold: 10

extensions.clusters.redis.v3.RedisClusterConfig

[extensions.clusters.redis.v3.RedisClusterConfig proto]

  1. {
  2. "cluster_refresh_rate": "{...}",
  3. "cluster_refresh_timeout": "{...}",
  4. "redirect_refresh_interval": "{...}",
  5. "redirect_refresh_threshold": "{...}",
  6. "failure_refresh_threshold": "...",
  7. "host_degraded_refresh_threshold": "..."
  8. }

cluster_refresh_rate

(Duration) Interval between successive topology refresh requests. If not set, this defaults to 5s.

cluster_refresh_timeout

(Duration) Timeout for topology refresh request. If not set, this defaults to 3s.

redirect_refresh_interval

(Duration) The minimum interval that must pass after triggering a topology refresh request before a new request can possibly be triggered again. Any errors received during one of these time intervals are ignored. If not set, this defaults to 5s.

redirect_refresh_threshold

(UInt32Value) The number of redirection errors that must be received before triggering a topology refresh request. If not set, this defaults to 5. If this is set to 0, topology refresh after redirect is disabled.

failure_refresh_threshold

(uint32) The number of failures that must be received before triggering a topology refresh request. If not set, this defaults to 0, which disables the topology refresh due to failure.

host_degraded_refresh_threshold

(uint32) The number of hosts became degraded or unhealthy before triggering a topology refresh request. If not set, this defaults to 0, which disables the topology refresh due to degraded or unhealthy host.