Make keep-alive timeout configurable

Change-Id: Iffadcddfb70650cdf4c6c4d9ec3b7471d63f5ff8
Closes-Bug: #1892622
This commit is contained in:
Radosław Piliszek 2020-08-23 20:33:51 +02:00
parent 393888a1cb
commit 8228b5ea12
5 changed files with 24 additions and 0 deletions

View File

@ -224,11 +224,15 @@ glance_tls_proxy_max_connections: 40000
glance_tls_proxy_processes: 1 glance_tls_proxy_processes: 1
glance_tls_proxy_process_cpu_map: "no" glance_tls_proxy_process_cpu_map: "no"
glance_tls_proxy_defaults_max_connections: 10000 glance_tls_proxy_defaults_max_connections: 10000
# Glance TLS proxy timeout values
glance_tls_proxy_http_request_timeout: "10s" glance_tls_proxy_http_request_timeout: "10s"
glance_tls_proxy_http_keep_alive_timeout: "10s"
glance_tls_proxy_queue_timeout: "1m" glance_tls_proxy_queue_timeout: "1m"
glance_tls_proxy_connect_timeout: "10s" glance_tls_proxy_connect_timeout: "10s"
glance_tls_proxy_client_timeout: "{{ haproxy_glance_api_client_timeout}}" glance_tls_proxy_client_timeout: "{{ haproxy_glance_api_client_timeout}}"
glance_tls_proxy_server_timeout: "{{ haproxy_glance_api_server_timeout }}" glance_tls_proxy_server_timeout: "{{ haproxy_glance_api_server_timeout }}"
glance_tls_proxy_check_timeout: "10s" glance_tls_proxy_check_timeout: "10s"
# Check http://www.haproxy.org/download/1.5/doc/configuration.txt for available options # Check http://www.haproxy.org/download/1.5/doc/configuration.txt for available options
glance_tls_proxy_defaults_balance: "roundrobin" glance_tls_proxy_defaults_balance: "roundrobin"

View File

@ -21,6 +21,7 @@ defaults
option redispatch option redispatch
retries 3 retries 3
timeout http-request {{ glance_tls_proxy_http_request_timeout }} timeout http-request {{ glance_tls_proxy_http_request_timeout }}
timeout http-keep-alive {{ glance_tls_proxy_http_keep_alive_timeout }}
timeout queue {{ glance_tls_proxy_queue_timeout }} timeout queue {{ glance_tls_proxy_queue_timeout }}
timeout connect {{ glance_tls_proxy_connect_timeout }} timeout connect {{ glance_tls_proxy_connect_timeout }}
timeout client {{ glance_tls_proxy_client_timeout }} timeout client {{ glance_tls_proxy_client_timeout }}

View File

@ -66,6 +66,7 @@ keepalived_extra_volumes: "{{ default_extra_volumes }}"
# Default timeout values # Default timeout values
haproxy_http_request_timeout: "10s" haproxy_http_request_timeout: "10s"
haproxy_http_keep_alive_timeout: "10s"
haproxy_queue_timeout: "1m" haproxy_queue_timeout: "1m"
haproxy_connect_timeout: "10s" haproxy_connect_timeout: "10s"
haproxy_client_timeout: "1m" haproxy_client_timeout: "1m"

View File

@ -27,6 +27,7 @@ defaults
option redispatch option redispatch
retries 3 retries 3
timeout http-request {{ haproxy_http_request_timeout }} timeout http-request {{ haproxy_http_request_timeout }}
timeout http-keep-alive {{ haproxy_http_keep_alive_timeout }}
timeout queue {{ haproxy_queue_timeout }} timeout queue {{ haproxy_queue_timeout }}
timeout connect {{ haproxy_connect_timeout }} timeout connect {{ haproxy_connect_timeout }}
timeout client {{ haproxy_client_timeout }} timeout client {{ haproxy_client_timeout }}

View File

@ -0,0 +1,17 @@
---
features:
- |
Makes it possible to set HAProxy's ``timeout http-keep-alive`` via
``haproxy_http_keep_alive_timeout``. The default is 10s, like the
previous default that applied via ``haproxy_http_request_timeout``.
`LP#1892622 <https://launchpad.net/bugs/1892622>`__
upgrade:
- |
HAProxy's ``timeout http-keep-alive`` is now set via
``haproxy_http_keep_alive_timeout``. The default is 10s, like the
previous default that applied via ``haproxy_http_request_timeout``,
but the new variable does not follow the old one so might need customising
if the former was customised for keep-alive purposes.
Do note the two values do not have to have the same value and often do not.
Please read the linked record for background.
`LP#1892622 <https://launchpad.net/bugs/1892622>`__