Linux集群HA

1、搭建LVS DR模式,见上一篇文章Linux集群之LB(负载均衡集群)篇
2、高可用搭建
使用Keepalived实现高可用
主副节点Keepalived设置
vi /etc/keepalived/keepalived.conf

! Configuration File for keepalived

global_defs {
   router_id R1
   }

vrrp_instance VI_1 {
    # 副节点 SLAVE
    state MASTER
    interface ens37
    virtual_router_id 66
    # 副节点稍微降低,建议30
    priority 80
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        120.10.10.100
    }
}

virtual_server 120.10.10.100 80 {
    delay_loop 1
    lb_algo rr
    lb_kind DR
    persistence_timeout 50
    protocol TCP

    real_server 120.10.10.12 80 {
        weight 1
        TCP_CHECK{
          connect_port 80
          connect_timeout 3
          nb_get_retry 3
          delay_before_retry 4
        }
    }
    real_server 120.10.10.13 80 {
        weight 1
        TCP_CHECK{
          connect_port 80
          connect_timeout 3
          nb_get_retry 3
          delay_before_retry 4
        }
    }
}

文章链接: https://www.mfisp.com/15702.html

文章标题:Linux集群HA

文章版权:梦飞科技所发布的内容,部分为原创文章,转载请注明来源,网络转载文章如有侵权请联系我们!

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

给TA打赏
共{{data.count}}人
人已打赏
建站教程投稿分享

Linux集群

2023-1-12 13:29:00

建站教程投稿分享

本地上传大文件到远程服务器的方法

2023-1-17 22:59:19

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
客户经理
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索

梦飞科技 - 最新云主机促销服务器租用优惠