官方网站
http://www.keepalived.org
- What is Keepalived ?
The main goal of the keepalived project is to add a strong & robust keepalive facility to the Linux Virtual Server project. This project is written in C with multilayer TCP/IP stack checks. Keepalived implements a framework based on three family checks : Layer3, Layer4 & Layer5/7. This framework gives the daemon the ability of checking a LVS server pool states. When one of the server of the LVS server pool is down, keepalived informs the linux kernel via a setsockopt call to remove this server entrie from the LVS topology. In addition keepalived implements an independent VRRPv2 stack to handle director failover. So in short keepalived is a userspace daemon for LVS cluster nodes healthchecks and LVS directors failover.
- Why using Keepalived ?
If your are using a LVS director to loadbalance a server pool in a production environnement, you may want to have a robust solution for healthcheck & failover.
- What about licence ?
Keepalived is licensed under the GNU General Public License (GPL).
使用指南(英文)
http://www.keepalived.org/pdf/UserGuide.pdf
实验LVS+keepalived
http://nhylovezyh.blog.51cto.com/1444948/666446
利用LVS+Keepalived 实现高性能高可用负载均衡服务器(推荐多看看这个)
http://31543.blog.51cto.com/21543/110472
lvs/dr+keepalived实现Web负载均衡Dr高可用
http://blog.chinaunix.net/space.php?do=blog&uid=23914782&id=2855940
什么是VRRPv2协议
http://www.net130.com/CMS/Pub/network/network_protocal/network_protocals_others/2010_06_24_11494.htm
博主留言:
课上跟学生交流了一下,发现他们的公司在使用keepalive,决定找找资料,学习学习。
前面那大段英文就不翻译了,有的词传达的意思太多找不到合适中文对照。例如 strong & robust 。
关于如何配置我找了几篇博文链接,我这里就不转载,自己过去看吧。
注意这几个地方:
- 软件设计中使用到了虚拟路由器冗余协议(vrrp)协议,VRRP跟ICMP、ARP这些协议相似,承载在IP协议之上,协议号是112,VRRP控制报文只有一种:VRRP通告(advertisement)。它使用IP多播数据包进行封装,组地址为224.0.0.18,发布范围只限于同一局域网内。配置文件中提供修改指令mcast_src_i,方便自定义。对了,在有些物理环境中(傻瓜交换机),交换机处理多播侦和广播侦是一样的,也就是说在内网不相关的主机上会收到这个些数据包。消耗一些网络带宽。
源码中定义位置:
blues@ubuntu:/localdisk/work$ grep "INADDR_VRRP_GROUP" keepalived-1.2.2/keepalived/include/vrrp.h
#define INADDR_VRRP_GROUP 0xe0000012
- 应用层获取的数据可以检验的更彻底。下面的例子中两句话,一个是获取指定文件,另一个是这个文件内容的hash值。
获取hash值
genhash –s 192.168.100.2 –p 80 –u /testurl/test.js
配置支持hash值
HTTP_GET {
url {
path /testurl/test.jsp
digest ec90a42b99ea9a2f5ecbe213
}
}
- 架构图
看懂这两张图软件基本就算掌握了。
官方网站
http://www.keepalived.org
- What is Keepalived ?
The main goal of the keepalived project is to add a strong & robust keepalive facility to the Linux Virtual Server project. This project is written in C with multilayer TCP/IP stack checks. Keepalived implements a framework based on three family checks : Layer3, Layer4 & Layer5/7. This framework gives the daemon the ability of checking a LVS server pool states. When one of the server of the LVS server pool is down, keepalived informs the linux kernel via a setsockopt call to remove this server entrie from the LVS topology. In addition keepalived implements an independent VRRPv2 stack to handle director failover. So in short keepalived is a userspace daemon for LVS cluster nodes healthchecks and LVS directors failover.
- Why using Keepalived ?
If your are using a LVS director to loadbalance a server pool in a production environnement, you may want to have a robust solution for healthcheck & failover.
- What about licence ?
Keepalived is licensed under the GNU General Public License (GPL).
使用指南(英文)
http://www.keepalived.org/pdf/UserGuide.pdf
实验LVS+keepalived
http://nhylovezyh.blog.51cto.com/1444948/666446
利用LVS+Keepalived 实现高性能高可用负载均衡服务器(推荐多看看这个)
http://31543.blog.51cto.com/21543/110472
lvs/dr+keepalived实现Web负载均衡Dr高可用
http://blog.chinaunix.net/space.php?do=blog&uid=23914782&id=2855940
什么是VRRPv2协议
http://www.net130.com/CMS/Pub/network/network_protocal/network_protocals_others/2010_06_24_11494.htm
博主留言:
课上跟学生交流了一下,发现他们的公司在使用keepalive,决定找找资料,学习学习。
前面那大段英文就不翻译了,有的词传达的意思太多找不到合适中文对照。例如 strong & robust 。
关于如何配置我找了几篇博文链接,我这里就不转载,自己过去看吧。
注意这几个地方:
- 软件设计中使用到了虚拟路由器冗余协议(vrrp)协议,VRRP跟ICMP、ARP这些协议相似,承载在IP协议之上,协议号是112,VRRP控制报文只有一种:VRRP通告(advertisement)。它使用IP多播数据包进行封装,组地址为224.0.0.18,发布范围只限于同一局域网内。配置文件中提供修改指令mcast_src_i,方便自定义。对了,在有些物理环境中(傻瓜交换机),交换机处理多播侦和广播侦是一样的,也就是说在内网不相关的主机上会收到这个些数据包。消耗一些网络带宽。
源码中定义位置:
blues@ubuntu:/localdisk/work$ grep "INADDR_VRRP_GROUP" keepalived-1.2.2/keepalived/include/vrrp.h
#define INADDR_VRRP_GROUP 0xe0000012
- 应用层获取的数据可以检验的更彻底。下面的例子中两句话,一个是获取指定文件,另一个是这个文件内容的hash值。
获取hash值
genhash –s 192.168.100.2 –p 80 –u /testurl/test.js
配置支持hash值
HTTP_GET {
url {
path /testurl/test.jsp
digest ec90a42b99ea9a2f5ecbe213
}
}
- 架构图