piranha配置

it2022-05-05  172

piranha配置

典型的高可用负载均衡 1)lvs + ldirectord + heartbeat lvs(ipvsadmin) 调度器,将用户请求分发到后端真实服务器,不负责健康检查 ldirectord 服务监控,真实服务器的服务异常,将其从lvs节点表中去除,恢复后添加 heartbeat 高可用,监控lvs节点是否正常,控制vip飘移

2) lvs + keepalived lvs keepalived

3) piranha

yum -y install piranha

dr /etc/sysctl.conf

net.ipv4.ip_forward = 1

realserver /etc/sysctl.conf

net.ipv4.conf.lo.arp_ignore = 1 net.ipv4.conf.lo.arp_announce = 2 net.ipv4.conf.all.arp_ignore = 1 net.ipv4.conf.all.arp_announce = 2

sysctl -p

/etc/sysconfig/ha/lvs.cf

service = lvs primary = 10.10.100.12 backup = 10.10.100.13 backup_active = 1 heartbeat = 1 heartbeat_port = 1050 keepalive = 6 deadtime = 10 debug_level = NONE network = direct virtual web-80 { address = 10.10.100.11 em2:0 vip_nmask = 255.255.255.255 fwmark = 100 active = 1 load_monitor = uptime timeout = 5 reentry = 10 port = http send = "GET / HTTP/1.0\r\n\r\n" expect = "HTTP" scheduler = sh persistent = 300 pmask = 255.255.255.255 protocol = tcp server srv01 { address = 10.10.100.12 active = 1 weight = 10 } server srv02 { address = 10.10.100.13 active = 1 weight = 10000 } }

/etc/sysconfig/network-scripts/ifcfg-lo:0

DEVICE=lo:0 IPADDR=10.10.100.11 NETMASK=255.255.255.255 ONBOOT=yes

/etc/sysconfig/network-scripts/route-lo:0

10.10.100.11/32 dev lo:0

http://www.gossamer-threads.com/lists/lvs/users/24231http://www.ultramonkey.org/2.0.1/topologies/sl-ha-lb-eg.html

posted on 2014-10-24 11:01 北京涛子 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/liujitao79/p/4047766.html

相关资源:Centos Piranha安装配置[LVS集群]

最新回复(0)