Skip to content

Instantly share code, notes, and snippets.

@specialunderwear
Created September 5, 2012 22:51
Show Gist options
  • Save specialunderwear/3646834 to your computer and use it in GitHub Desktop.
Save specialunderwear/3646834 to your computer and use it in GitHub Desktop.
haproxy config file
global
maxconn 4096
pidfile /var/run/haproxy.pid
daemon
defaults
mode http
retries 3
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000
listen <%= @hostname -%>
bind 0.0.0.0:80
mode tcp
balance roundrobin
<% nodes.each do node %>
server <% = node['hostname'] -%> <% node['ipaddress'] -%>:8080 check inter 2000
<% end -%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment