首页 > 代码库 > 03-keepalived实现nginx负载均衡服务的高可用(主主模式)
03-keepalived实现nginx负载均衡服务的高可用(主主模式)
相比较主备模式,可以设置另一个虚拟路由
此为controller1配置
! Configuration File for keepalived global_defs { notification_email { root@localhost } notification_email_from keepalived@localhost smtp_server 127.0.0.1 smtp_connect_timeout 30 router_id controller1 vrrp_mcast_group4 224.0.32.18 } vrrp_instance keepnginx { state MASTER interface eno16777736 virtual_router_id 60 priority 100 advert_int 1 authentication { auth_type PASS auth_pass 123456 } virtual_ipaddress { 9.110.187.60/24 dev eno16777736 label eno16777736:1 } track_interface { eno16777736 eno33554960 } } vrrp_instance keepnginx2 { state BACKUP interface eno16777736 virtual_router_id 61 priority 99 advert_int 1 authentication { auth_type PASS auth_pass 123456 } virtual_ipaddress { 9.110.187.61/24 dev eno16777736 label eno16777736:1 } track_interface { eno16777736 eno33554960 } }
controller2配置及效果图
03-keepalived实现nginx负载均衡服务的高可用(主主模式)
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。