当前位置:网站首页>Keepalived setting does not preempt resources
Keepalived setting does not preempt resources
2022-07-03 17:48:00 【Brother Xing plays with the clouds】
keepalived do HA when , We often encounter preemptive master and backup Switch between
example:
Usually if master After the service died backup Will become master, But when master When the service is better again master Preemption occurs VIP, In this way, there will be two switches, which is not good for busy websites . So we need to add... To the configuration file nopreempt non-preemptive , But this parameter can only be used for state by backup, So we're using HA It's the best time to master and backup Of state Set up backup Let it go through priority To compete .
Be careful : After this configuration , We should pay attention to starting keepalived The order of services , Suppose I want A Become backup Then you can't start it first A Of keepalived service .
Here is the combination MHA Architecture master 、 Standby database configuration example
Main library
[[email protected] ~]# more /etc/keepalived/keepalived.conf #20140916 #!/bin/bash
global_defs { router_id mysqlmha }
vrrp_script check_run { script "/etc/keepalived/check_mysql.sh" interval 1 }
vrrp_instance VI_1 { state BACKUP -- The status here is specified as backup interface eth0 virtual_router_id 151 priority 100 advert_int 1 nopreempt -- Set up nopreempt Prevent preemption of resources authentication { auth_type PASS auth_pass 1111 }
track_script { check_run } virtual_ipaddress { 192.168.66.53 } }
For the library
[[email protected] ~]# more /etc/keepalived/keepalived.conf ! Configuration File for keepalived
global_defs { router_id mysqlmha }
vrrp_script check_run { script "/etc/keepalived/check_mysql.sh" interval 1 }
vrrp_instance VI_1 { state BACKUP interface eth0 virtual_router_id 151 priority 90 advert_int 1 authentication { auth_type PASS auth_pass 1111 }
track_script { check_run }
virtual_ipaddress { 192.168.66.53 } }
边栏推荐
- Stm32h7 Hal library SPI DMA transmission has been in busy solution
- Internet hospital his management platform source code, online consultation, appointment registration smart hospital applet source code
- c# .net 工具生态
- VM11289 WAService. js:2 Do not have __ e handler in component:
- Wechat applet for the first time
- First day of rhcsa study
- Graduation summary
- QT learning diary 9 - dialog box
- 毕业总结
- Qt调节Win屏幕亮度和声音大小
猜你喜欢
1164 Good in C
Discussion sur la logique de conception et de mise en oeuvre du processus de paiement
Ml (machine learning) softmax function to realize the classification of simple movie categories
互联网医院HIS管理平台源码,在线问诊,预约挂号 智慧医院小程序源码
1164 Good in C
鸿蒙第三次培训
Global and Chinese health care OEM and ODM market status survey and investment planning recommendations report 2022-2028
vs2013已阻止安装程序,需安装IE10
TCP congestion control details | 3 design space
Records of long objects and long judgments in the stream of list
随机推荐
Research Report on competitive strategy Outlook Analysis and investment strategic planning of China's smart home equipment industry, 2022-2028
Cloud primordial weekly | CNCF released the 2021 cloud primordial development status report, which was released on istio 1.13
Micro service component sentinel console call
[RT thread] NXP rt10xx device driver framework -- Audio construction and use
鸿蒙第四次培训
Implementation of Tetris in C language
c# . Net tool ecosystem
Classroom attendance system based on face recognition tkinter+openpyxl+face_ recognition
Ml (machine learning) softmax function to realize the classification of simple movie categories
How to read the source code [debug and observe the source code]
Swm32 series Tutorial 4 port mapping and serial port application
Embedded-c language-7
面试官:值为 nil 为什么不等于 nil ?
Gear2021 monthly update - December
(8) HS corner detection
Life perception 1
POM in idea XML graying solution
Remote office tools sharing | community essay solicitation
小程序 多tab 多swiper + 每个tab分页
微服务组件Sentinel控制台调用