Hi guys. I am trying to use the weight to be able to
take a server out of the pool, have the existing
connections finish up, then reboot the real server,
etc.
I am using 'wlc' but even if I set a weight of 0 to
one real server, and 1 to another, I still get new
connections to the real server with a 0 weight. I am
not sure if I am doing something wrong. Below is how
I run LVS. I would appreciate any pointers as to
whether I'm messing something up.
I run LVS with keepalived.
Startup script:
------------------------------------------------
/sbin/ipvsadm -A -t PUBLIC_IP:80 -s wlc -p
2100 -M 255.255.255.0
/sbin/ipvsadm -A -t PUBLIC_IP:443 -s wlc -p
2100 -M 255.255.255.0
/usr/local/sbin/keepalived -D
touch /var/lock/subsys/keepalived
Output of 'ipvsadm -L -n'
----------------------------------------------------
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight
ActiveConn InActConn
TCP PUBLIC_IP:443 wlc persistent 2100 mask
255.255.255.0
-> 10.20.5.21:443 Masq 1 0
0
-> 10.20.5.20:443 Masq 1 0
0
TCP PUBLIC_IP:80 wlc persistent 2100 mask
255.255.255.0
-> 10.20.5.21:80 Masq 1 1
0
-> 10.20.5.20:80 Masq 1 3
1
/etc/keepalived/keepalived.conf (very basic):
----------------------------------------------
virtual_server PUBLIC_IP 80 {
delay_loop 6
lb_algo lc
lb_kind NAT
nat_mask 255.255.255.0
protocol TCP
real_server 10.20.5.20 80 {
weight 1
TCP_CHECK {
connect_timeout 3
connect_port 80
}
}
real_server 10.20.5.21 80 {
weight 1
TCP_CHECK {
connect_timeout 3
connect_port 80
}
}
}
virtual_server PUBLIC_IP 443 {
delay_loop 6
lb_algo lc
lb_kind NAT
nat_mask 255.255.255.0
protocol TCP
real_server 10.20.5.20 443 {
weight 1
TCP_CHECK {
connect_timeout 3
connect_port 443
}
}
real_server 10.20.5.21 443 {
weight 1
TCP_CHECK {
connect_timeout 3
connect_port 443
}
}
}
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|