I'm trying to replicate the setup our hosting provider have done for our load balancer, which is using keepalived. So I have one "load balancer", running CentOS 6 and keepalived 1.2.7, with two Web servers running Ubuntu 12.04 LTS and Apache 2.2.
If I query one of the two Web servers directly, it's working fine, I get the response in a couple of miliseconds. But if I try to query the Web site by the load balancer, it takes one minute to get the response.
I fired up wireshark on the load balancer, and I see a lot of TCP DUP ACK and TCP Retransmission, from both sides (my Mac and the load balancer).
Anyone having the same problem?
Configuration:
vrrp_script chk_haproxy {
script "killall -0 haproxy"
interval 2
weight 5
}
vrrp_script chk_http {
script "killall -0 apache2"
interval 2
weight 5
}
vrrp_instance VI_LOCAL {
interface eth1
state MASTER
virtual_router_id 51
priority 101
virtual_ipaddress {
10.6.79.1
}
track_script {
chk_haproxy
}
track_interface {
eth0
eth1
}
}
vrrp_instance VI_PUB {
interface eth0
state MASTER
virtual_router_id 52
priority 101
virtual_ipaddress {
192.168.1.129
192.168.1.127
192.168.1.128
}
track_script {
chk_haproxy
#chk_http
}
track_interface {
eth0
eth1
}
}
virtual_server 192.168.1.129 80 {
delay_loop 6
lb_algo rr
lb_kind NAT
protocol TCP
real_server 10.6.79.10 80 {
weight 1
TCP_CHECK {
connect_timeout 180
}
}
real_server 10.6.79.11 80 {
weight 1
TCP_CHECK {
connect_timeout 180
}
}
}
virtual_server 192.168.1.129 443 {
delay_loop 6
lb_algo rr
lb_kind NAT
protocol TCP
real_server 10.6.79.10 443 {
weight 1
TCP_CHECK {
connect_timeout 180
}
}
real_server 10.6.79.11 443 {
weight 1
TCP_CHECK {
connect_timeout 180
}
}
}