Jerry Zhao d4b335dedd Add timeout check and timeout queue with recommended value
There were also occurances that httpchk experienced timeout. Right
now we are using default value 2000ms. Try using 10s suggested by
the example config in openstack doc.

Related-bug: #1344144
Change-Id: I7a72d7a22a1845d1e2d480eee88246f980f87e6c
2014-07-23 11:32:28 -07:00

39 lines
1.0 KiB
Plaintext

global
#log 127.0.0.1 local0
log 127.0.0.1 local4 notice
log 127.0.0.1 local4 info
daemon
maxconn <%= node['haproxy']['global_max_connections'] %>
#debug
#quiet
spread-checks 5
user <%= node['haproxy']['user'] %>
group <%= node['haproxy']['group'] %>
<% if node['haproxy']['enable_stats_socket'] -%>
stats socket <%= node['haproxy']['stats_socket_path'] %> user <%= node['haproxy']['stats_socket_user'] %> group <%= node['haproxy']['stats_socket_group'] %>
<% end -%>
defaults
log global
mode http
retries 3
<% @defaults_timeouts.sort.map do | value, time | -%>
timeout <%= value %> <%= time %>
<% end -%>
<% @defaults_options.sort.each do | option | -%>
option <%= option %>
<% end -%>
balance <%= node['haproxy']['balance_algorithm'] %>
# Set up application listeners here.
<% node['haproxy']['listeners'].each do |type, listeners | %>
<% listeners.each do |name, listen| %>
<%= type %> <%= name %>
<% listen.each do |option| %>
<%= option %>
<% end %>
<% end %>
<% end %>