mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/redis-ha] Enable sticky connections balancing via HAProxy. (#19589)
I just found that python Redis client (Sentry, Weblate) is having trouble with HAProxy + Redis HA scheme. It seems like HAProxy balance source + hash-type consistent does the trick. Signed-off-by: Andrey Voronkov <avoronkov@enapter.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
a494c6bb4a
commit
b4ac7ad5ca
@@ -6,7 +6,7 @@ keywords:
|
||||
- redis
|
||||
- keyvalue
|
||||
- database
|
||||
version: 4.1.6
|
||||
version: 4.2.0
|
||||
appVersion: 5.0.6
|
||||
description: Highly available Kubernetes implementation of Redis
|
||||
icon: https://upload.wikimedia.org/wikipedia/en/thumb/6/6b/Redis_Logo.svg/1200px-Redis_Logo.svg.png
|
||||
|
||||
@@ -108,6 +108,7 @@ The following table lists the configurable parameters of the Redis chart and the
|
||||
| `haproxy.service.type` | HAProxy service type "ClusterIP", "LoadBalancer" or "NodePort" | `ClusterIP` |
|
||||
| `haproxy.service.nodePort` | HAProxy service nodePort value (haproxy.service.type must be NodePort) | not set |
|
||||
| `haproxy.service.annotations` | HAProxy service annotations | `{}` |
|
||||
| `haproxy.stickyBalancing` | HAProxy sticky load balancing to Redis nodes. Helps with connections shutdown. | `false` |
|
||||
| `haproxy.hapreadport.enable` | Enable a read only port for redis slaves | `false` |
|
||||
| `haproxy.hapreadport.port` | Haproxy port for read only redis slaves | `6380` |
|
||||
| `haproxy.metrics.enabled` | HAProxy enable prometheus metric scraping | `false` |
|
||||
|
||||
@@ -185,6 +185,10 @@
|
||||
{{- end }}
|
||||
# Check all redis servers to see if they think they are master
|
||||
backend bk_redis_master
|
||||
{{- if .Values.haproxy.stickyBalancing }}
|
||||
balance source
|
||||
hash-type consistent
|
||||
{{- end }}
|
||||
mode tcp
|
||||
option tcp-check
|
||||
tcp-check connect
|
||||
@@ -204,6 +208,10 @@
|
||||
{{- end }}
|
||||
{{- if .Values.haproxy.readOnly.enabled }}
|
||||
backend bk_redis_slave
|
||||
{{- if .Values.haproxy.stickyBalancing }}
|
||||
balance source
|
||||
hash-type consistent
|
||||
{{- end }}
|
||||
mode tcp
|
||||
option tcp-check
|
||||
tcp-check connect
|
||||
|
||||
@@ -40,6 +40,9 @@ haproxy:
|
||||
pullPolicy: IfNotPresent
|
||||
annotations: {}
|
||||
resources: {}
|
||||
## Enable sticky sessions to Redis nodes via HAProxy
|
||||
## Very useful for long-living connections as in case of Sentry for example
|
||||
stickyBalancing: false
|
||||
## Kubernetes priorityClass name for the haproxy pod
|
||||
# priorityClassName: ""
|
||||
## Service type for HAProxy
|
||||
|
||||
Reference in New Issue
Block a user