keepalived 实现服务器级别的接管,比如nginx 宕机了 不会接管,可以写shell 脚本实现,当nginx 挂了,把keepalived 停掉
while true
do
if [ ‘ps -ef|grep nginx|grep -v grep|wc -l‘ -lt 2 ]
then
/etc/init.d/keepalived stop
fi
sleep 5
donekeepalived 高可用问题及企业解决方案实战
原文:http://blog.51cto.com/skinglzw/2156507