Hello,
You can do this using hostname ACLs, heres an example config:
backend back_std
balance roundrobin
redispatch
server ws4 192.168.1.4:80 weight 30 check
stats uri /status
stats refresh 10
backend back_lb
balance roundrobin
redispatch
cookie SERVERID insert nocache
server ws1 192.168.1.1:80 cookie ws1 weight 30 check server ws2 192.168.1.2:80 cookie ws2 weight 30 check server ws3 192.168.1.3:80 cookie ws3 weight 30 checkstats uri /status
frontend http-in
bind :80
acl hosts_lb hdr_end(host) -i www.mylbsite1.com acl hosts_lb hdr_end(host) -i www.mylbsite1.com:80 acl hosts_lb hdr_end(host) -i www.mylbsite2.com acl hosts_lb hdr_end(host) -i www.mylbsite2.com:80 acl hosts_lb hdr_end(host) -i www.mylbsite3.com acl hosts_lb hdr_end(host) -i www.mylbsite3.com:80 acl hosts_std hdr_end(host) -i www.normalsite1.com acl hosts_std hdr_end(host) -i www.normalsite1.com:80 acl hosts_std hdr_end(host) -i www.normalsite2.com acl hosts_std hdr_end(host) -i www.normalsite2.com:80
use_backend back_lb if hosts_lb
use_backend back_std if hosts_std
Hope this helps!
Nat,
From: Shahid P.A [mailto:shahid.azeez#gmail.com]
Sent: 28 May 2008 07:48
To: haproxy#formilux.org; w#1wt.eu
Subject: Haproxy Dought
Hello
I configured haproxy on my server and it was running smoothly. But the problem is that on my server there are total 4 sites from which I want to load balance only 2 sites. Right now I load balanced all the 4 sites. Is there any way for load balancing only few sites not all the sites in a server and other sites should work as normal ( without load balace).
This archive was generated by hypermail 2.2.0 : 2008/05/28 09:45 CEST