LVS+keepalived的配置只能访问一个realserver
如题
贴上我的keepalive的配置文件
! Configuration File for keepalived
global_defs {
notification_email {
test@gmail.com
}
notification_email_from root@localhost
smtp_server 127.0.0.1
smtp_connect_timeout 30
router_id LVS_1
}
vrrp_instance LVS_HA {
state MASTER
interface bond0
virtual_router_id 60
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.53.251
}
}
virtual_server 192.168.53.251 80 {
delay_loop 6
lb_algo rr
lb_kind DR
nat_mask 255.255.255.0
persistence_timeout 5
protocol TCP
real_server 192.168.53.237 80 {
weight 1
TCP_CHECK {
delay_before_retry 3
connect_timeout 20
connect_port 80
#nb_get_retry 3
retry 3
}
}
real_server 192.168.53.236 80 {
weight 1
TCP_CHECK {
delay_before_retry 3
connect_timeout 20
connect_port 80
#nb_get_retry 3
retry 3
}
}
}
为什么每次只能访问236 或者237呢,当能访问236的时候,我用多个客户端,多次请求每次都是236,于是我吧236这台的http服务停掉,他就访问不了了,这不应该啊。同理有时访问是237的时候也一样,停掉了237就访问不了了,请高手指点指点