On 24/01/2013 11:27, James Bensley wrote:
Woops! Sorry guys,

Cheers,
James

global
        log 127.0.0.1 local0
        user haproxy
        group haproxy
        daemon
        stats socket /var/run/haproxy/haproxy.sock mode 0600 level admin

defaults
        log     global
        mode    http
        option  httplog
        option  dontlognull
        retries 3
        maxconn 10000
        contimeout      5000
        clitimeout      50000
        srvtimeout      50000

listen  https-servers   127.0.0.1:80

        cookie appserver insert
        option persist
         option redispatch

        server appserver1 10.0.0.1:80 cookie server1 check inter 2000 rise 3 
fall 3
        server appserver2 10.0.0.2:80 cookie server2 check inter 2000 rise 3 
fall 3

        balance source

listen  http-servers     public.ip:80

         cookie appserver insert
         option persist
         option redispatch

         server  appserver1 10.0.0.1:80 cookie server1 check inter 2000
rise 3 fall 3
         server  appserver2 10.0.0.2:80 cookie server2 check inter 2000
rise 3 fall 3

         balance source

Change:
balance source

to

balance roundrobin

This will allow haproxy to send each new request to a different server, and then maintain sessions by tracking the appsession cookie you are inserting.

Chris

Reply via email to