From 3e4542e5956c7911489746ec3829c948723c4956 Mon Sep 17 00:00:00 2001 From: Manuel de Brito Fontes Date: Fri, 8 Sep 2017 16:53:31 -0300 Subject: [PATCH] Enable keepalive in upstreams --- controllers/nginx/pkg/config/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/nginx/pkg/config/config.go b/controllers/nginx/pkg/config/config.go index cace7b7bd..e29977e65 100644 --- a/controllers/nginx/pkg/config/config.go +++ b/controllers/nginx/pkg/config/config.go @@ -335,7 +335,7 @@ type Configuration struct { // upstream servers that are preserved in the cache of each worker process. When this // number is exceeded, the least recently used connections are closed. // http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive - // Default: 0 (disabled) + // Default: 32 UpstreamKeepaliveConnections int `json:"upstream-keepalive-connections,omitempty"` // Sets the maximum size of the variables hash table. @@ -429,7 +429,7 @@ func NewDefault() Configuration { LimitRate: 0, LimitRateAfter: 0, }, - UpstreamKeepaliveConnections: 0, + UpstreamKeepaliveConnections: 32, LimitConnZoneVariable: defaultLimitConnZoneVariable, BindAddressIpv4: defBindAddress, BindAddressIpv6: defBindAddress,