Sha256: 106a7eeb0c24cfb065e2b9e2cfda3ee57079b297291a8791a8c3f5c0631fb9d5

Contents?: true

Size: 1.28 KB

Versions: 1

Compression:

Stored size: 1.28 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 internal_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

1 entries across 1 versions & 1 rubygems

Version Path
auser-poolparty-1.1.5 lib/poolparty/templates/haproxy.conf