OK after a while I got brave and changed the ldirectord.cf file myself. I included the two services (MYSQL & Apache) like so:
Code:
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes
virtual=192.168.0.105:80
real=192.168.0.101:80 gate
real=192.168.0.102:80 gate
fallback=127.0.0.1:80 gate
service=http
request="ldirector.html"
receive="Elvis has left the building!"
scheduler=rr
protocol=tcp
checktype=negotiate
# Global Directives
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes
virtual = 192.168.0.105:3306
service = mysql
real = 192.168.0.101:3306 gate
real = 192.168.0.102:3306 gate
checktype = negotiate
login = "ldirector"
passwd = "ldirectorpassword"
database = "ldirectordb"
request = "SELECT * FROM connectioncheck"
scheduler = wrr
I then rebooted the two load balancers and issued the following command:
Code:
bubba:/home/pete# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.0.105:80 rr
-> 192.168.0.101:80 Route 1 0 0
-> 192.168.0.102:80 Route 1 0 0
TCP 192.168.0.105:3306 wrr
-> 192.168.0.101:3306 Route 1 0 0
-> 192.168.0.102:3306 Route 1 0 0
bubba:/home/pete#
Seeing this was what I wanted. I was able to access both services via the virtual address 192.168.0.105. I added rsync for Apache using this How To:
http://www.howtoforge.com/mirroring_with_rsync
This gave me all the functionality I was looking for:
1. Replicated MYSQL databases
2. Mirrored Apapche Servers
3. Loadbalancing of services
4. Fault-tolerence of services
My next question would be how can I take advantage of this technology for my mail server which really is the most important service I have.
Thanks again to anyone who can help,
Pete
Granada Spain
Recent comments
16 hours 44 min ago
19 hours 40 min ago
20 hours 54 min ago
22 hours 17 min ago
23 hours 55 min ago
1 day 1 hour ago
1 day 2 hours ago
1 day 18 hours ago
1 day 19 hours ago
1 day 23 hours ago