Hello,
I have setup successfully a LVS NAT using one director
(192.168.2.1)and several realserver with apache and PHP module...
THe LVS works fine....
Thanks to the LVS-mini-HOWTO
(http://www.linuxvirtualserver.org/Joseph.Mack/mini-HOWTO/LVS-mini-HOW
TO.html)
director : eth0:1 192.168.1.1
eth0:2 192.168.2.1
realserver eth0 192.168.1.x
client one the 192.168.2.0 network
NB:this is just for testing... the implemeted stuff will be available
on the LAN...
I would like now to add Mysql (wanna provide a php based web site for
the intranet)....I know that load balancing for MySQL is not possible
(or at least strongly not recommended) so I was thinking of using the
replication feature...One master and one slave with replication in
both way (M -> S and S->M) as explain in MySQL manual....
Now my question...
I am a bit lost with the integration of MySQL in the thing...I mean
MySQL wont be Load balanced...so shall i add my master in the LVS
with:
ipvsadm -A -t 192.168.2.1:mysql -s -rr
ipvsadm -a -t 192.168.2.1:mysql -r 192.168.1.8:mysql -m -w 1
192.168.1.8 will be the realserver with MySQL (master)
but then I wonder how to make the request from my PHP website because
i think apache and Mysql will "talk" directly i mean not through the
director
Or the second solution i am thinking of is to not put the ipvsadm on
MySQL and with the correct PHP request on the database it will work
I hope you understand what i mean.....
Tell me if you dont and i ll try to sort out my ideas...
Thanks
Francois
|