Please help to load balancing httpd and mysqld with keepalived
Dear All,
I have 4 servers: - One is loadbalancer, installed keepalived and ipvsadm - LV1 - One is failover for loadbalancer, installed keepalived and ipvsadm too - LV2 - The other servers was installed httpd and mysqld. (RealServer) LV1 load balancing for both httpd and mysql. And it's working fine. VIP for http: 192.168.1.110 VIP for mysql: 192.168.1.111 Now I want to setup a website on RealServers , with URL is http://192.168.1.110, and this website connect to mysql via VIP 192.168.1.111, this means real servers will connect to their mysql via load balancer (LV!). I tried to connect mysql via VIP from real server but it cannot. Please help me if I can make this? Thanks so much!! |
Maybe start with tcpdump on LV1 and watch port 3306 (I think), it may not be routing between VIP's
cheers |
Thanks a lot, kbp.
Actually, when I stand at RealServer1 and connect to VIP:mysql, it's ok at the first, but not ok at the second, and ok at the third... RealServer2 is the same. I think when a RealServer connect to its mysql, it's NOT ok. But when a RealServer connect to mysql of the other, it's ok. I don't know why... Could you please let me know how to route between VIP? |
Are you doing active/passive load balancing for mysql or active/active ?
|
I did keepalived with roundrobin for load balancing mysql. That is your mean?
Uhm, mysql is being active at both two realservers.. |
And Im having a trouble with keepalived.:(
Status is MASTER on both LV1 and LV2, not MASTER and BACKUP. Ipvsadm is still working fine !! In the log message on two servers Code:
[root@localhost ~]# tail /var/log/messages Code:
vrrp_instance VI { Please help me. Thank you so much! |
Please forget about latest reply!
That is because I didn't allow multicast IP 224.0.0.8 and protocol 112 in iptables. Just add lines which listed below in iptables and restart it. Code:
-A RH-Firewall-1-INPUT -i eth0 -d 224.0.0.0/8 -j ACCEPT |
Quote:
|
All times are GMT -5. The time now is 01:04 AM. |