Kaynağa Gözat

Merge "Variable to set HTTP keepalive mode"

changes/03/645903/1
Zuul 7 ay önce
ebeveyn
işleme
ca51879876
3 değiştirilmiş dosya ile 8 ekleme ve 1 silme
  1. 4
    0
      defaults/main.yml
  2. 1
    0
      templates/haproxy.cfg.j2
  3. 3
    1
      templates/service.j2

+ 4
- 0
defaults/main.yml Dosyayı Görüntüle

@@ -104,6 +104,10 @@ haproxy_connect_timeout: "10s"
haproxy_http_request_timeout: "5s"
# Set the maximum inactivity time on the server side
haproxy_server_timeout: "50s"
# Set the HTTP keepalive mode to use
# Disable persistent connections by default because they can cause issues when the server side closes the connection
# at the same time a request is sent.
haproxy_keepalive_mode: 'forceclose'


## haproxy tuning params

+ 1
- 0
templates/haproxy.cfg.j2 Dosyayı Görüntüle

@@ -28,6 +28,7 @@ defaults
log global
option dontlognull
option redispatch
option {{ haproxy_keepalive_mode }}
retries {{ haproxy_retries }}
timeout client {{ haproxy_client_timeout }}
timeout connect {{ haproxy_connect_timeout }}

+ 3
- 1
templates/service.j2 Dosyayı Görüntüle

@@ -44,7 +44,9 @@ frontend {{ item.service.haproxy_service_name }}-front-{{ loop.index }}
{% if request_option == "http" %}
option httplog
option forwardfor except 127.0.0.0/8
option http-server-close
{% if item.service.haproxy_http_keepalive_mode is defined %}
option {{ item.service.haproxy_http_keepalive_mode }}
{% endif %}
{% elif request_option == "tcp" %}
option tcplog
{% endif %}

Loading…
İptal
Kaydet