From b3a70fc82d280b1bab0481122144c6baa3987b1a Mon Sep 17 00:00:00 2001 From: Aaron Kuehler Date: Mon, 15 Jan 2024 13:02:51 -0500 Subject: [PATCH] Increase haproxy maximum connections (#36) Increase the number of concurrent client connections allowed to the HAProxy pod before connections are put on the Kernel's socket queue. Internal testing revealed this as a contributing source to latency and connection timeouts when Redis is under load. References ---------- - https://www.haproxy.com/blog/protect-servers-with-haproxy-connection-limits-and-queues --- CHANGELOG.md | 1 + operator/redisfailover/service/generator.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 215ddefd5..9dcc53afa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Also check this project's [releases](https://github.com/powerhome/redis-operator ### Fixed - [Cleanup Sentinels when bootstrapping and sentinels are not allowed](https://github.com/powerhome/redis-operator/pull/33). +- [Prevent connection throttling for more than 256 concurrent client connections](https://github.com/powerhome/redis-operator/pull/36) ### Added - [Bootstrap settings - Add an `enabled` parameter to toggle the bootstrap mode on or off for a RedisFailover. (Defaults to `true`)](https://github.com/powerhome/redis-operator/pull/32). diff --git a/operator/redisfailover/service/generator.go b/operator/redisfailover/service/generator.go index d7c1cbe5e..d4bb94faa 100644 --- a/operator/redisfailover/service/generator.go +++ b/operator/redisfailover/service/generator.go @@ -143,7 +143,7 @@ func generateHAProxyConfigmap(rf *redisfailoverv1.RedisFailover, labels map[stri port := rf.Spec.Redis.Port haproxyCfg := fmt.Sprintf(`global daemon - maxconn 256 + maxconn 5000 defaults mode tcp