Keepalived provides a strong and robust health checking for LVS clusters. It implements a framework of health checking on multiple layers for server failover, and VRRPv2 stack to handle director failover. How do I install and configure Keepalived for reverse proxy server such as nginx or lighttpd?

If your are using a LVS director to loadbalance a server pool in a production environment, you may want to have a robust solution for healthcheck & failover. This will also work with reverse proxy server such as nginx.

本日志由 flyinweb 于 2011-12-09 09:36:24 发表到 WEB服务器 中,目前已经被浏览 294 次,评论 0 次;

作者添加了以下标签: NginxkeepalivedIP Failover

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

How do configure to release and obtain VIP (virtual IP) when nginx is dead, down or system is rebooted for the kernel upgrades?

Edit /usr/local/etc/keepalived/keepalived.conf and add the following section to check whether nginx is alive or dead:
# vi /usr/local/etc/keepalived/keepalived.conf
Updated file on both lb0 and lb1:

vrrp_script chk_http_port {
        script "/usr/bin/killall -0 nginx"
        interval 2
        weight 2}
vrrp_instance VI_1 {
        interface eth0
        state MASTER
        virtual_router_id 51
        priority 101
        authentication {
            auth_type PASS
            auth_pass Add-Your-Password-Here
        }
        track_script {
            chk_http_port
        }
        virtual_ipaddress {202.54.1.1/29 dev eth1
        }}

Save and close the file. Reload keealived:
# /etc/init.d/keepalived restart
If nginx died due to any issues keepalived will release master VIP and backup server will become active. When master nginx LB0 comes backs online, the backup LB1 will go down in backup state.

本日志由 flyinweb 于 2011-12-09 09:34:42 发表到 WEB服务器 中,目前已经被浏览 333 次,评论 0 次;

作者添加了以下标签: KeepAlivedNginx FailoverNginx

一、简介:
keepalived是一个类似于layer3, 4 & 5交换机制的软件,也就是我们平时说的第3层、第4层和第5层交换.Keepalived的作用是检测web服务器的状态,如果有一台web服务器死机,或工作出现故障,Keepalived将检测到,并将有故障的web服务器从系统中剔除,当web服务器工作正常后Keepalived自动将web服务器加入到服务器群中,这些工作全部自动完成,不需要人工干涉,需要人工做的只是修复故障的web服务器.
 
Haproxy 反向代理服务器,支持双机热备支持虚拟主机,但其配置简单,拥有非常不错的服务器健康检查功能,当其代理的后端服务器出现故障, HAProxy会自动将该服务器摘除,故障恢复后再自动将该服务器加入.新的1.3引入了frontend,backend,frontend根据任意HTTP请求头内容做规则匹配,然后把请求定向到相关的backend.

本日志由 flyinweb 于 2011-09-23 08:49:15 发表到 系统架构 中,目前已经被浏览 631 次,评论 0 次;

作者添加了以下标签: keepalivedhaproxyHA负载均衡

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

LVS NAT + Keepalived HOWTO

By Adam Fletcher (C) 2002, released under GPL


Install, testing and running of a Keepalived HA based LVS/NAT


本日志由 flyinweb 于 2009-10-22 15:58:18 发表到 系统架构 中,目前已经被浏览 4172 次,评论 0 次;

作者添加了以下标签: LVSkeepalived

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

利用keepalived 实现HA&LB

本日志由 flyinweb 于 2009-09-25 10:07:26 发表到 系统架构 中,目前已经被浏览 3961 次,评论 0 次;

作者添加了以下标签: keepalived负载均衡

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文