~ubuntu-branches/ubuntu/vivid/haproxy/vivid

« back to all changes in this revision

Viewing changes to tests/test-fwlc.cfg

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2008-06-20 00:38:50 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080620003850-hvvx94g2xz2l2xbg
Tags: 1.3.15.1-1
* New Upstream Version
* Upgrade standards version to 3.8.0 (no change needed).
* Build with TARGET=linux26 on linux, TARGET=generic on other systems.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This is a test configuration.
 
2
# It makes use of a farm built from 4 active servers and 4 backup servers,
 
3
# all listenening to different IP addresses on port 80. Health-checks are
 
4
# TCP only on port 81 so that iptables rules permit easy selection of which
 
5
# servers are enabled or disabled.
 
6
#
 
7
# Create statistics counters this way :
 
8
#
 
9
#   iptables -N http
 
10
#   iptables -A OUTPUT -p tcp --syn --dport 80 -j http
 
11
#   for i in $(seq 1 8); do iptables -A http -d 127.0.0.$i; done
 
12
#   iptables -A http -d 127.0.0.0/24
 
13
#
 
14
# Consult the statistics using iptables this way:
 
15
#
 
16
#   iptables --line-numbers -nxvL http
 
17
#   iptables -Z http
 
18
 
19
#
 
20
# Block individual servers like this :
 
21
#   iptables -I INPUT -p tcp --dport 81 -d 127.0.0.1 -j DROP
 
22
#
 
23
 
 
24
global
 
25
        maxconn    1000
 
26
        stats socket /tmp/sock1 mode 600
 
27
        stats timeout 3000
 
28
        stats maxconn 2000
 
29
 
 
30
listen  sample1
 
31
        mode       tcp
 
32
        retries    1
 
33
        redispatch
 
34
        contimeout 1000
 
35
        clitimeout 120000
 
36
        srvtimeout 120000
 
37
        maxconn    40000
 
38
        bind       :8080
 
39
        balance    leastconn
 
40
        option     allbackups
 
41
        server     act1 127.0.0.1:80 weight 10 maxconn 200 check inter 1000 fall 1
 
42
        server     act2 127.0.0.2:80 weight 20 maxconn 200 check inter 1000 fall 1
 
43
        server     act3 127.0.0.3:80 weight 30 maxconn 200 check inter 1000 fall 1
 
44
        server     act4 127.0.0.4:80 weight 40 maxconn 200 check inter 1000 fall 1
 
45
        server     bck1 127.0.0.5:80 weight 10 check inter 1000 fall 1 backup
 
46
        server     bck2 127.0.0.6:80 weight 20 check inter 1000 fall 1 backup
 
47
        server     bck3 127.0.0.7:80 weight 30 check inter 1000 fall 1 backup
 
48
        server     bck4 127.0.0.8:80 weight 40 check inter 1000 fall 1 backup
 
49
        option     httpclose
 
50
 
 
51
listen  sample1
 
52
        mode       http
 
53
        contimeout 1000
 
54
        clitimeout 50000
 
55
        srvtimeout 50000
 
56
        maxconn    40000
 
57
        bind       :8081
 
58
        balance    leastconn
 
59
        option     httpclose
 
60
        stats      uri /stats
 
61
        stats      refresh 5