~rlane/nova/ldapimprovements

« back to all changes in this revision

Viewing changes to contrib/puppet/templates/haproxy.cfg.erb

  • Committer: Ryan Lane
  • Date: 2010-11-24 15:46:32 UTC
  • mfrom: (382.48.1 trunk)
  • Revision ID: laner@controller-20101124154632-zh7kwjuyyd02a2lh
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# this config needs haproxy-1.1.28 or haproxy-1.2.1
 
2
 
 
3
global
 
4
    log 127.0.0.1    local0
 
5
    log 127.0.0.1    local1 notice
 
6
    #log loghost    local0 info
 
7
    maxconn 4096
 
8
    #chroot /usr/share/haproxy
 
9
    stats socket /var/run/haproxy.sock
 
10
    user haproxy
 
11
    group haproxy
 
12
    daemon
 
13
    #debug
 
14
    #quiet
 
15
 
 
16
defaults
 
17
    log    global
 
18
    mode    http
 
19
    option    httplog
 
20
    option    dontlognull
 
21
    retries    3
 
22
    option redispatch
 
23
    stats enable
 
24
    stats uri /haproxy
 
25
    maxconn    2000
 
26
    contimeout    5000
 
27
    clitimeout    50000
 
28
    srvtimeout    50000
 
29
 
 
30
 
 
31
listen    nova-api 0.0.0.0:8773
 
32
    option httpchk GET / HTTP/1.0\r\nHost:\ example.com
 
33
    option forwardfor
 
34
    reqidel ^X-Forwarded-For:.*
 
35
    balance    roundrobin
 
36
<% api_servers.to_i.times do |offset| %><% port = api_base_port.to_i + offset -%>
 
37
    server    api_<%= port %> 127.0.0.1:<%= port %> maxconn 1 check 
 
38
<% end -%>
 
39
    option    httpclose        # disable keep-alive