文章目录
- 一、lvs 高可用的必要性
- 二、ldirectord软件
- 三、 [LVS 高可用性实现 — ldirectord
-
- 1、lvs-dr环境部署
- 2、故障出现
- 四、ldirectord 的应用
-
- 1、ldirectord的部署
- 2、故障恢复时
一、lvs 高可用的必要性
LVS 不可用时 :
Director不可用,整个系统将不可用;SPoF Single Point of Failure
解决方案:高可用,keepalived、heartbeat/corosync
RS 不可用时:
某RS不可用时,Director依然会调度请求至此RS
解决方案: 由Director对各RS健康状态进行检查,失败时禁用,成功时启用
常用解决方案:
- keepalived
- heartbeat/corosync
- ldirectord
ldirectord 检测方式:
- 络层检测:icmp
- 传输层检测:端口探测
- 应用层检测,请求某关键资源
RS全不用时可以设置backup server, sorry serve
二、ldirectord软件
ldirectord是专门为LVS监控而编写的,用来监控lvs架构中服务器池(server pool) 的服务器状态。ldirectord 运行在 IPVS 节点上, ldirectord作为一个守护进程启动后会对服务器池中的每个真是服务器发送请求进行监控,如果 服务器没有响应 ldirectord 的请求,那么ldirectord 认为该服务器不可用,ldirectord 会运行 ipvsadm 对 IPVS表中该服务器进行删除,如果等下次再次检测有相应则通过
ipvsadm 进行添加:
ldirectord:监控和控制LVS守护进程,可管理LVS规则
包名:ldirectord-3.9.6-0rc1.1.1.x86_64.rpm
下载:[http://download.opensuse.org/repositories/network:/ha-clustering:/Stable/CentOS_CentOS-7/x86_64/]
三、 [LVS 高可用性实现 – ldirectord
1、lvs-dr环境部署
环境配置
role | host | ip | vip | os |
---|---|---|---|---|
Director-Server | node01 | 192.168.5.11 | 192.168.5.100 | centos-7.8 |
Web1 | node02 | 192.168.5.12 | 192.168.5.100 | centos-7.8 |
Web1 | node3 | 192.168.5.13 | 192.168.5.100 | centos-7.8 |
Client | Client | Client | 192.168.5.150 | rhel-7.2 |
Director-Server 配置
Real Server配置 (node03配置雷同)
测试:
四、ldirectord 的应用
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!