03-keepalived实现nginx负载均衡服务的高可用(主主模式)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了03-keepalived实现nginx负载均衡服务的高可用(主主模式)相关的知识,希望对你有一定的参考价值。
相比较主备模式,可以设置另一个虚拟路由
此为controller1配置
! Configuration File for keepalived global_defs { notification_email { [email protected] } notification_email_from [email protected] 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负载均衡服务的高可用(主主模式)的主要内容,如果未能解决你的问题,请参考以下文章