PDA

View Full Version : Load Balancer with 2 virtual ip address


thefusa
2nd September 2009, 12:23
Hi,
I've installed 2 phisical server with MySQL in load balancing following the HOW-TO.
I've 2 load balancing serverwith Ultra monkey that manage my virtual ip.
(192.168.0.99 in my case)

Now I need to do the same thing with my web server (I'll follow the HOW-TO about apache load-balancing)
So I'll install another 2 phisical server.

My question is:
I wish to know If it's possibile to use the same loadbalancing servers i use for mysql also for Apache virtual ip? (192.168.0.100)

Thanks a lot

falko
3rd September 2009, 16:57
Should be no problem - you can even use the same virtual IP as Apache and MySQL use different ports (80 and 3306).

thefusa
4th September 2009, 11:34
ok.
so If i wish to use 2 different ip those could be my config files:

haresources:

lb1.mydomain.it \
ldirectord::ldirectord.cf \
LVSSyncDaemonSwap::master \
IPaddr2::192.168.0.99/24/eth1/10.14.10.255 (MySQL cluster)
IPaddr2::192.168.0.100/24/eth1/10.14.10.255 (Apache Cluster)


and this my ldirectord.cf file:


# Global Directives
# checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes
virtual=192.168.0.99:3306
service=mysql
real=192.168.0.92:3306 gate 50
real=192.168.0.93:3306 gate 10
checktype=negotiate
login="ldirector"
passwd="ldirectorpassword"
database="ldirectordb"
request="SELECT * FROM connectioncheck"
scheduler=wrr
virtual=192.168.0.99:80
service=http
real=192.168.0.94:3306 gate
real=192.168.0.95:3306 gate
checktype=negotiate
request="ldirector.html"
receive="Test Page"
protocol=tcp
checktype=negotiate
scheduler=wrr


Thats' right? :)

fazi_puri
13th November 2009, 14:47
hey i am using HOW-TO about apache load-balancing for making load balancres
can you plz guide me that how can i check that my virtual ip is working?????
actually i am new in linux so plz help me.........

ikvenu2000
30th November 2009, 16:56
Hi thefusa,

Has your configuration worked fine?
Bcos i also want to implement the similar kind of LB and HA.