Merge pull request #65 from chaordic/upstreams-keepalive

Add keepalive option to upstreams configuration
This commit is contained in:
Jeff Geerling 2016-09-12 16:49:27 -05:00 committed by GitHub
commit a767f2741c
2 changed files with 4 additions and 0 deletions

View File

@ -62,6 +62,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 %}