Skip to content

Commit 768cbf5

Browse files
authored
Set upstream zone size to 512k (#609)
Sets the upstream zone size for all upstreams to 512k. This will support up to 648 upstream servers.
1 parent f74c06d commit 768cbf5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/nginx/config/upstreams_template.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
package config
22

3-
// FIXME(kate-osborn): Add upstream zone size for each upstream.
4-
// This should be dynamically calculated based on the number of upstreams.
3+
// FIXME(kate-osborn): Dynamically calculate upstream zone size based on the number of upstreams.
4+
// 512k will support up to 648 upstream servers.
55
var upstreamsTemplateText = `
66
{{ range $u := . }}
77
upstream {{ $u.Name }} {
88
random two least_conn;
9+
zone {{ $u.Name }} 512k;
910
{{ range $server := $u.Servers }}
1011
server {{ $server.Address }};
1112
{{- end }}

0 commit comments

Comments
 (0)