高可用4层lvs——keepalived

高可用4层lvs——keepalived
强烈推介IDEA2021.1.3破解激活,IntelliJ IDEA 注册码,2021.1.3IDEA 激活码  

大家好,我是架构君,一个会写代码吟诗的架构师。今天说一说高可用4层lvs——keepalived,希望能够帮助大家进步!!!

搭建方式:

node01:

ipvsadm -C

ifconfig eth0:2 down

---------------------------------

node01,node04安装keepalived

配置:

node01

/etc/keepalived/keepalived.conf

做个bak备份,再修改

vrrp 虚拟路由冗余协议

vrrp_instance VI_1 {

state MASTER    //node04 BACKUP
interface eth0
virtual_router_id 51      
priority 100    //node04 50
advert_int 1
authentication {

auth_type PASS
auth_pass 1111
}
virtual_ipaddress {

192.168.118.100/24 dev eth0 label eth0:3
}
}

real_server 192.168.118.12 80 {
        weight 1
        HTTP_GET {
            url {
              path / 
              status_code 200
            }
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    }

    real_server 192.168.118.13 80 {
        weight 1
        HTTP_GET {
            url {
              path /
              status_code 200
            }
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    }

 

转载于:https://www.cnblogs.com/littlepage/p/11302421.html

本文来源weixin_30595035,由架构君转载发布,观点不代表Java架构师必看的立场,转载请标明来源出处:https://javajgs.com/archives/29521

发表评论