Add upstream keepalive connections cache

This commit is contained in:
Manuel de Brito Fontes 2017-06-21 23:39:06 -04:00
parent 42351662b6
commit 6e2203594e
3 changed files with 15 additions and 0 deletions

View file

@ -235,6 +235,11 @@ http {
{{ $cfg.LoadBalanceAlgorithm }};
{{ end }}
{{ end }}
{{ if (gt $cfg.UpstreamKeepaliveConnections 0) }}
keepalive {{ $cfg.UpstreamKeepaliveConnections }};
{{ end }}
{{ range $server := $upstream.Endpoints }}server {{ $server.Address | formatIP }}:{{ $server.Port }} max_fails={{ $server.MaxFails }} fail_timeout={{ $server.FailTimeout }};
{{ end }}
}