Add keepalive option to upstreams configuration

This commit is contained in:
Thiago Caiubi 2016-08-08 11:35:47 -03:00
parent e818255465
commit 86a18f8fd1
2 changed files with 4 additions and 0 deletions

View File

@ -59,6 +59,7 @@ nginx_vhosts: []
nginx_upstreams: []
# - name: myapp1
# strategy: "ip_hash" # "least_conn", etc.
# keepalive: 16 # optional
# servers: {
# "srv1.example.com",
# "srv2.example.com weight=3",

View File

@ -53,6 +53,9 @@ http {
{% for server in upstream.servers %}
server {{ server }};
{% endfor %}
{% if upstream.keepalive is defined %}
keepalive {{ upstream.keepalive }};
{% endif %}
}
{% endfor %}