} }
real_server 192.168.0.2 6379 { weight 3
notify_up /home/wind/redis_up.sh MISC_CHECK {
misc_path \ misc_timeout 5 } }
real_server 192.168.0.3 6379 { weight 3
notify_up /home/wind/redis_up.sh MISC_CHECK {
misc_path \ misc_timeout 5 } } }
virtual_server 192.168.0.8 6379 { delay_loop 3 lb_algo wrr lb_kind DR
persistence_timeout 30 protocol TCP
real_server 192.168.0.2 6379 { weight 8 TCP_CHECK { connect_timeout 10 nb_get_retry 3
delay_before_retry 3 connect_port 6379 } }
real_server 192.168.0.3 6379 { weight 2 TCP_CHECK { connect_timeout 10 nb_get_retry 3 delay_before_retry 3 connect_port 6379 } }
real_server 192.168.0.4 6379 { weight 2 TCP_CHECK { connect_timeout 10 nb_get_retry 3 delay_before_retry 3 connect_port 6379 } } }
route2的配置文件
! Configuration File for keepalived
global_defs {
notification_email {
# xieqj@bitauto.com #shanghq@bitauto.com }
notification_email_from xieqj@bitauto.com smtp_server mail.bitauto.com smtp_connect_timeout 30 router_id LVS_DEVEL }
vrrp_instance VI_1 { state BACKUP interface eth1 virtual_router_id 100 priority 100 advert_int 1 authentication { auth_type PASS auth_pass 1111 }
virtual_ipaddress { 192.168.87.89 }
#notify_master \}
vrrp_instance VI_2 { state MASTER interface eth1 virtual_router_id 101 priority 151 advert_int 1 authentication {
auth_type PASS auth_pass 1111 }
virtual_ipaddress { 192.168.87.90 } }
virtual_server 192.168.87.89 6379 { delay_loop 3 lb_algo rr lb_kind DR
persistence_timeout 15 protocol TCP
real_server 192.168.87.103 6379 { weight 4
notify_up /home/wind/redis_up.sh MISC_CHECK {
misc_path \ misc_timeout 5 } }
real_server 192.168.87.104 6379 { weight 4
notify_up /home/wind/redis_up.sh MISC_CHECK {
misc_path \ misc_timeout 5 } }
real_server 192.168.87.105 6379 {
weight 4
notify_up /home/wind/redis_up.sh MISC_CHECK {
misc_path \ misc_timeout 5 } } }
virtual_server 192.168.87.90 6379 { delay_loop 3 lb_algo wrr lb_kind DR
persistence_timeout 30 protocol TCP
real_server 192.168.87.104 6379 { weight 8 TCP_CHECK { connect_timeout 10 nb_get_retry 3 delay_before_retry 3 connect_port 6379 } }
real_server 192.168.87.105 6379 { weight 2 TCP_CHECK { connect_timeout 10 nb_get_retry 3 delay_before_retry 3 connect_port 6379