~ubuntu-branches/ubuntu/intrepid/haproxy/intrepid

« back to all changes in this revision

Viewing changes to tests/test-fwrr.cfg

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2008-03-09 21:30:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080309213029-8oupnrc607mg5uqw
Tags: 1.3.14.3-1
* New Upstream Version
* Add status argument support to init-script to conform to LSB.
* Cleanup pidfile after stop in init script. Init script return code fixups.

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       http
 
32
        retries    1
 
33
        redispatch
 
34
        contimeout 1000
 
35
        clitimeout 5000
 
36
        srvtimeout 5000
 
37
        maxconn    40000
 
38
        bind       :8080
 
39
        balance    roundrobin
 
40
        option     allbackups
 
41
        server     act1 127.0.0.1:80 weight 10 check port 81 inter 1000 fall 1
 
42
        server     act2 127.0.0.2:80 weight 20 check port 81 inter 1000 fall 1
 
43
        server     act3 127.0.0.3:80 weight 30 check port 81 inter 1000 fall 1
 
44
        server     act4 127.0.0.4:80 weight 40 check port 81 inter 1000 fall 1
 
45
        server     bck1 127.0.0.5:80 weight 10 check port 81 inter 1000 fall 1 backup
 
46
        server     bck2 127.0.0.6:80 weight 20 check port 81 inter 1000 fall 1 backup
 
47
        server     bck3 127.0.0.7:80 weight 30 check port 81 inter 1000 fall 1 backup
 
48
        server     bck4 127.0.0.8:80 weight 40 check port 81 inter 1000 fall 1 backup
 
49
        option     httpclose
 
50
        stats      uri /stats
 
51
        stats      refresh 5