Redis Cluster Config

12 views
Skip to first unread message

Ted Novak

unread,
Mar 30, 2026, 11:31:54 AM (6 days ago) Mar 30
to envoy-users
I am trying to connect to a Redis Cluster and send reads to replicas. Even if I select PREFER_REPLICA or Replica, it seems the command is always issued to the master. My config is below. Any obvious reason why it does not try reading from replicas?

admin:
  address:
    socket_address:
      address: 0.0.0.0
      port_value: 9001

static_resources:
  listeners:
  - name: redis_listener
    address:
      socket_address: { address: 0.0.0.0, port_value: 1999 }
    filter_chains:
    - filters:
      - name: envoy.filters.network.redis_proxy
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.network.redis_proxy.v3.RedisProxy
          stat_prefix: egress_redis
          settings:
            op_timeout: 5s
            enable_redirection: true
            read_policy: PREFER_REPLICA
          prefix_routes:
            catch_all_route:
              cluster: redis_cluster_discovery

  clusters:
  - name: redis_cluster_discovery
    connect_timeout: 0.25s
    cluster_type:
      name: envoy.clusters.redis
      typed_config:
        "@type": type.googleapis.com/envoy.extensions.clusters.redis.v3.RedisClusterConfig
        cluster_refresh_rate: 5s
        cluster_refresh_timeout: 0.5s
    lb_policy: RING_HASH
    load_assignment:
      cluster_name: redis_cluster_discovery
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address: { address: 192.168.56.205, port_value: 7060 }
        - endpoint:
            address:
              socket_address: { address: 192.168.56.205, port_value: 7061 }
        - endpoint:
            address:
              socket_address: { address: 192.168.56.205, port_value: 7062 }

Reply all
Reply to author
Forward
0 new messages