File tree Expand file tree Collapse file tree 5 files changed +14
-14
lines changed Expand file tree Collapse file tree 5 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 1
1
{ {- /*
2
- Copyright 2024 New Vector Ltd
2
+ Copyright 2024-2025 New Vector Ltd
3
3
4
4
SPDX-License-Identifier: AGPL-3.0-only
5
5
*/ -} }
@@ -66,16 +66,6 @@ defaults
66
66
compression algo gzip
67
67
compression type text/plain text/html text/xml application/json text/css
68
68
69
- # if we hit the maxconn on a server, and the queue timeout expires, we want
70
- # to avoid returning 503, since that will cause cloudflare to mark us down.
71
- #
72
- # https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#1.3.1 says:
73
- #
74
- # 503 when no server was available to handle the request, or in response to
75
- # monitoring requests which match the "monitor fail" condition
76
- #
77
- errorfile 503 /usr/local/etc/haproxy/429.http
78
-
79
69
# Use a consistent hashing scheme so that worker with balancing going down doesn't cause
80
70
# the traffic for all others to be shuffled around.
81
71
hash-type consistent sdbm
Original file line number Diff line number Diff line change 1
1
{ {- /*
2
- Copyright 2024 New Vector Ltd
2
+ Copyright 2024-2025 New Vector Ltd
3
3
4
4
SPDX-License-Identifier: AGPL-3.0-only
5
5
*/ -} }
Original file line number Diff line number Diff line change @@ -25,6 +25,16 @@ frontend synapse-http-in
25
25
# same as http log, with %Th (handshake time)
26
26
log-format "%ci:%cp [%tr] %ft %b/%s %Th/%TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{ +Q} r"
27
27
28
+ # if we hit the maxconn on a server, and the queue timeout expires, we want
29
+ # to avoid returning 503, since that will cause cloudflare to mark us down.
30
+ #
31
+ # https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#1.3.1 says:
32
+ #
33
+ # 503 when no server was available to handle the request, or in response to
34
+ # monitoring requests which match the "monitor fail" condition
35
+ #
36
+ errorfile 503 /synapse/429.http
37
+
28
38
capture request header Host len 32
29
39
capture request header Referer len 200
30
40
capture request header User-Agent len 200
Original file line number Diff line number Diff line change @@ -20,8 +20,6 @@ app.kubernetes.io/version: {{ include "element-io.ess-library.labels.makeSafe" .
20
20
{ {- with required " element-io.haproxy.configmap-data missing context" .context -} }
21
21
haproxy.cfg: |
22
22
{ {- tpl ($root .Files.Get " configs/haproxy/haproxy.cfg.tpl" ) (dict " root" $root " context" .) | nindent 2 } }
23
- 429.http: |
24
- { {- (tpl ($root .Files.Get " configs/haproxy/429.http.tpl" ) dict) | nindent 2 } }
25
23
{ {- end -} }
26
24
{ {- end -} }
27
25
Original file line number Diff line number Diff line change @@ -223,6 +223,8 @@ redis.conf: |
223
223
224
224
{ {- define " element-io.synapse-haproxy.configmap-data" -} }
225
225
{ {- $root := .root -} }
226
+ 429.http: |
227
+ { {- (tpl ($root .Files.Get " configs/haproxy/429.http.tpl" ) dict) | nindent 2 } }
226
228
path_map_file: |
227
229
{ {- (tpl ($root .Files.Get " configs/synapse/path_map_file.tpl" ) (dict " root" $root )) | nindent 2 } }
228
230
path_map_file_get: |
You can’t perform that action at this time.
0 commit comments