Sha256: 215e7f3ab88639d68b6fbbb4a30248352a824fcd4fd02436d768ceaee36f9f63

Contents?: true

Size: 1.27 KB

Versions: 5

Compression:

Stored size: 1.27 KB

Contents

global
  daemon
  maxconn       4096      # total max connections (dependent on ulimit)
  nbproc        1         # number of processing cores
  user          haproxy
  group         haproxy
  chroot        /var/run/haproxy
  log 127.0.0.1 local0 debug
  pidfile /var/run/haproxy.pid
 
defaults  
  log               global # Log to the global log
  clitimeout 150000
  srvtimeout 150000
  contimeout 30000
 
  option            httplog
  option            httpclose     # disable keepalive (HAProxy does not yet support the HTTP keep-alive mode)
  option            forwardfor    # enable insert of X-Forwarded-For headers
  retries 3
  option            redispatch
  
  balance roundrobin            # each server is used in turns, according to assigned weight
  
  # Stats
  stats enable
  stats uri /poolparty
  stats realm Statistics\ for\ PoolParty

listen <%= @node[:poolparty][:haproxy_name] %>
    mode              <%= @node[:poolparty][:proxy_mode] %>
    bind 0.0.0.0:<%= @node[:poolparty][:ports_haproxy].join(",0.0.0.0:") %>
    cookie POOLPARTYPARTY
    <% %x[/usr/bin/server-list-active ip].split("\t").each_with_index do |ip, index| %>
    server <%= index == 0 ? "master" : "node#{index}" %> <%= ip %>:<%= @node[:poolparty][:forwarding_port] %> weight 1 check cookie
    <% end %>

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
auser-poolparty-1.1.1 lib/poolparty/templates/haproxy.conf
auser-poolparty-1.1.3 lib/poolparty/templates/haproxy.conf
auser-poolparty-1.1.4 lib/poolparty/templates/haproxy.conf
fairchild-poolparty-1.1.3 lib/poolparty/templates/haproxy.conf
fairchild-poolparty-1.1.4 lib/poolparty/templates/haproxy.conf