Skip to content

Commit

Permalink
Follow redis redirects by default (#26043)
Browse files Browse the repository at this point in the history
#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`.
  • Loading branch information
dantecatalfamo authored Feb 6, 2025
1 parent fadd20c commit f8de2d9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changes/22791-redis-default-follow-redirect
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Enabled redis cluster follow redierctions by default
2 changes: 1 addition & 1 deletion docs/Configuration/fleet-server-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion server/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit f8de2d9

Please sign in to comment.