From f8de2d9e50bea8840686d34c9aab00c1beafbc77 Mon Sep 17 00:00:00 2001 From: Dante Catalfamo <43040593+dantecatalfamo@users.noreply.github.com> Date: Thu, 6 Feb 2025 13:32:31 -0500 Subject: [PATCH] Follow redis redirects by default (#26043) #22791 This will prevent the occasional redirect from breaking live queries. Customers can still disable the redirects by setting `redis.cluster_follow_redirections` to `false`. --- changes/22791-redis-default-follow-redirect | 1 + docs/Configuration/fleet-server-configuration.md | 2 +- server/config/config.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changes/22791-redis-default-follow-redirect diff --git a/changes/22791-redis-default-follow-redirect b/changes/22791-redis-default-follow-redirect new file mode 100644 index 000000000000..0a4a6b1a474a --- /dev/null +++ b/changes/22791-redis-default-follow-redirect @@ -0,0 +1 @@ +- Enabled redis cluster follow redierctions by default diff --git a/docs/Configuration/fleet-server-configuration.md b/docs/Configuration/fleet-server-configuration.md index e37cebc2fe43..47a371bf0b56 100644 --- a/docs/Configuration/fleet-server-configuration.md +++ b/docs/Configuration/fleet-server-configuration.md @@ -327,7 +327,7 @@ cluster is unstable and reorganizing the data. With this configuration option set to true, those (typically short and transient) redirection errors can be handled transparently instead of ending in an error. -- Default value: false +- Default value: true - Environment variable: `FLEET_REDIS_CLUSTER_FOLLOW_REDIRECTIONS` - Config file format: ```yaml diff --git a/server/config/config.go b/server/config/config.go index 42cd7e1faab3..bac17f126449 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -1006,7 +1006,7 @@ func (man Manager) addConfigs() { man.addConfigDuration("redis.connect_timeout", 5*time.Second, "Timeout at connection time") man.addConfigDuration("redis.keep_alive", 10*time.Second, "Interval between keep alive probes") man.addConfigInt("redis.connect_retry_attempts", 0, "Number of attempts to retry a failed connection") - man.addConfigBool("redis.cluster_follow_redirections", false, "Automatically follow Redis Cluster redirections") + man.addConfigBool("redis.cluster_follow_redirections", true, "Automatically follow Redis Cluster redirections") man.addConfigBool("redis.cluster_read_from_replica", false, "Prefer reading from a replica when possible (for Redis Cluster)") man.addConfigString("redis.tls_cert", "", "Redis TLS client certificate path") man.addConfigString("redis.tls_key", "", "Redis TLS client key path")