高可用性 – Piranha


 Home> lvs > 高可用性 – Piranha  :2014 :Mr.zhou  阅读: 

  Piranha 是红帽公司的一个集群产品,它包含 IPVS 内核代码、集群监控工具和基于网络的集群配置工具。

  Piranha 监控工具有两个主要功能:

  × 主、备负载均衡器之间的心跳检测
  × 检测每台真实服务器上服务的可用性

配置举例

  现在使用Piranha 和两台负载均衡器、三台Web服务器搭建一个高可用的基于 VS/NAT 的Web集群。拓扑见下图。在这个例子中,虚拟IP地址为 10.23.8.80 网关地址为 172.18.1.254 。这两个IP地址在两个负载均衡器间浮动。三台真实Web服务器的IP地址分别为 172.18.1.11 172.18.1.12 172.18.1.13

VirtualServer piranha

  两台负载均衡器上的Piranha配置文件是相同的。如下:

primary = 10.23.8.1
service = lvs
rsh_command = rsh
backup_active = 1
backup = 10.23.8.2
heartbeat = 1
heartbeat_port = 539
keepalive = 4
deadtime = 12
network = nat
nat_router = 172.18.1.254 eth1:0
nat_nmask = 255.255.255.0
reservation_conflict_action = preempt
debug_level = NONE
virtual web {
     active = 1
     address = 10.23.8.80 eth0:1
     vip_nmask = 255.255.255.255
     port = 80
     persistent = 600
     send = "GET / HTTP/1.0\r\n\r\n"
     expect = "HTTP"
     load_monitor = none
     scheduler = wlc
     protocol = tcp
     timeout = 6
     reentry = 15
     quiesce_server = 0
     server webserver1 {
         address = 172.18.1.11
         active = 1
         weight = 100
     }
     server webserver2 {
         address = 172.18.1.12
         active = 1
         weight = 100
     }
     server webserver3 {
         address = 172.18.1.13
         active = 1
         weight = 100
     }
}

  



正文部分到此结束

转载请注明原文链接 http://www.z-dig.com/the-piranha-solution.html