Skip to content

Commit 81fcdf5

Browse files
rwinieskiPeng Zhou
authored andcommitted
add timeout config for HAProxy
1 parent c73f7cc commit 81fcdf5

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ Following table lists all the parameters supported by the latest MarkLogic Helm
207207
| `haproxy.additionalAppServers` | List of additional HTTP Ports configuration for HAproxy | `[]` |
208208
| `haproxy.tcpports.enabled` | Parameter to enable TCP port routing on HAProxy | `false` |
209209
| `haproxy.tcpports` | TCP Ports and load balancing type configuration for HAproxy | `[]` |
210+
| `haproxy.timemout.client` | Timeout client measures inactivity during periods that we would expect the client to be speaking | `600s` |
211+
| `haproxy.timeout.connect` | Timeout connect configures the time that HAProxy will wait for a TCP connection to a backend server to be established | `600s` |
212+
| `haproxy.timeout.server` | Timeout server measures inactivity when we’d expect the backend server to be speaking | `600s` |
210213
| `haproxy.tls.enabled` | Parameter to enable TLS for HAProxy | `false` |
211214
| `haproxy.tls.secretName` | Name of the secret that stores the certificate | `""` |
212215
| `haproxy.tls.certFileName` | The name of the certificate file in the secret | `""` |

charts/charts/haproxy/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,13 @@ tcpports:
104104
# type: TCP
105105
# port: 5432
106106

107+
# Timeout configuration for HAProxy
108+
# See Ref: https://www.haproxy.com/blog/the-four-essential-sections-of-an-haproxy-configuration#timeout-connect-timeout-client-timeout-server
109+
timeout:
110+
client: 600s
111+
connect: 600s
112+
server: 600s
113+
107114
## Automatically Roll Deployments
108115
# ref: https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
109116
checksumConfigMap:

charts/templates/configmap-haproxy.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ data:
2626
defaults
2727
log global
2828
option forwardfor
29-
timeout client 600s
30-
timeout connect 600s
31-
timeout server 600s
29+
timeout client {{ .Values.haproxy.timeout.client }}
30+
timeout connect {{ .Values.haproxy.timeout.connect }}
31+
timeout server {{ .Values.haproxy.timeout.server }}
3232
3333
resolvers dns
3434
# add nameserver from /etc/resolv.conf

charts/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,14 @@ haproxy:
420420
# type: TCP
421421
# port: 5432
422422

423+
424+
# Timeout configuration for HAProxy. It is recommended to set the same timeout on HAproxy as it is on MarkLogic App-Server (default to 600 second).
425+
# ref: https://www.haproxy.com/blog/the-four-essential-sections-of-an-haproxy-configuration#timeout-connect-timeout-client-timeout-server
426+
timeout:
427+
client: 600s
428+
connect: 600s
429+
server: 600s
430+
423431
## Configure TLS for HAProxy
424432
## Put the PEM-formatted SSL certificate into a secret and provide the secret name in the secretName field.
425433
## The PEM-formatted SSL certificate should contain the private key and the certificate. For example: cat certificate.pem private-key.pem > mycert.pem

0 commit comments

Comments
 (0)