Skip to content

Commit

Permalink
Set upstream zone size to 512k (#609)
Browse files Browse the repository at this point in the history
Sets the upstream zone size for all upstreams to 512k. This will support up to 648 upstream servers.
  • Loading branch information
kate-osborn authored May 3, 2023
1 parent f74c06d commit 768cbf5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/nginx/config/upstreams_template.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package config

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

0 comments on commit 768cbf5

Please sign in to comment.