91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

haproxy+keepalived(主主模式)實現高可用環境的簡單配置

發布時間:2020-08-07 20:05:16 來源:網絡 閱讀:531 作者:Mr_sheng 欄目:建站服務器

參考:haproxy+keepalived(主從模式)實現高可用環境的簡單配置? ? ?https://blog.51cto.com/sf1314/2357735?

主主模式就是需要兩個VIP,即兩個haproxy節點都同時在提供服務,

當有一個haproxy掛掉后,它的vip資源就會漂到另一個haproxy節點上(此時它將有兩個vip都在提供服務),故障轉移無感知.


[root@Haproxy_Keepalived_Master ~]# vim /etc/keepalived/keepalived.conf
! 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 HAproxy237
}
?
vrrp_script chk_haproxy {???????????????????????????????????#HAproxy 服務監控腳本????????????????????
??script?"/etc/keepalived/check_haproxy.sh"
??interval 2
??weight 2
}
?
vrrp_instance VI_1 {
??state MASTER
??interface eth0
??virtual_router_id 51
??priority 100
??advert_int 1
??authentication {
????auth_type PASS
????auth_pass 1111
}
??track_script {
????chk_haproxy
}
virtual_ipaddress {
????182.148.15.239
}
notify_master?"/etc/keepalived/clean_arp.sh 182.148.15.239"
}
vrrp_instance VI_2 {
??state BACKUP
??interface eth0
??virtual_router_id 52
??priority 99
??advert_int 1
??authentication {
????auth_type PASS
????auth_pass 1111
}
virtual_ipaddress {
??182.148.15.235
}
notify_master?"/etc/keepalived/clean_arp.sh 182.148.15.235"
}
??
3)Haproxy_Keepalived_Backup服務器上的Keepalived配置如下:
[root@Haproxy_Keepalived_Backup ~]# /etc/keepalived/keepalived.conf /etc/keepalived/keepalived.conf-bak
[root@Haproxy_Keepalived_Backup ~]# vim /etc/keepalived/keepalived.conf
! 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 HAproxy236
}
?
vrrp_script chk_haproxy {????????????????????????????
??script?"/etc/keepalived/check_haproxy.sh"
??interval 2
??weight 2
}
?
vrrp_instance VI_1 {
??state BACKUP
??interface eth0
??virtual_router_id 51
??priority 99
??advert_int 1
??authentication {
????auth_type PASS
????auth_pass 1111
}
??track_script {
????chk_haproxy
}
virtual_ipaddress {
????182.148.15.239
}
notify_master?"/etc/keepalived/clean_arp.sh 182.148.15.239"
}
vrrp_instance VI_2 {
??state MASTER
??interface eth0
??virtual_router_id 52
??priority 100
??advert_int 1
??authentication {
????auth_type PASS
????auth_pass 1111
}
virtual_ipaddress {
??182.148.15.235
}
notify_master?"/etc/keepalived/clean_arp.sh 182.148.15.235"
}




向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

溧水县| 刚察县| 博野县| 渝中区| 呼玛县| 阳谷县| 铁岭市| 深泽县| 惠水县| 鸡西市| 马山县| 邹平县| 清镇市| 北辰区| 宣威市| 朝阳区| 北宁市| 黄龙县| 峨山| 房产| 漠河县| 崇明县| 莱西市| 栖霞市| 南召县| 罗山县| 铁岭市| SHOW| 峨眉山市| 姜堰市| 桦甸市| 萝北县| 同德县| 松潘县| 利辛县| 塘沽区| 简阳市| 长岭县| 井研县| 山东省| 叙永县|