当前位置:网站首页>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 } }
边栏推荐
- 基于人脸识别的课堂考勤系统 tkinter+openpyxl+face_recognition
- Play with fancy special effects. This AE super kit is for you
- [combinatorics] generating function (shift property)
- Detailed explanation of common network attacks
- PHP processing - watermark images (text, etc.)
- Life perception 1
- Internet hospital his management platform source code, online consultation, appointment registration smart hospital applet source code
- Hongmeng fourth training
- 分布式的任务分发框架-Gearman
- IntelliJ 2021.3 short command line when running applications
猜你喜欢
[RT thread] NXP rt10xx device driver framework -- RTC construction and use
IntelliJ 2021.3 short command line when running applications
QT adjust win screen brightness and sound size
SQL injection database operation foundation
Market demand survey and marketing strategy analysis report of global and Chinese pet milk substitutes 2022-2028
Wechat applet for the first time
Internet Hospital his Management Platform source, online Inquiry, appointment Registration Smart Hospital Small program source
As soon as we enter "remote", we will never regret, and several people will be happy and several people will be sad| Community essay solicitation
Leetcode 108 converts an ordered array into a binary search tree -- recursive method
TensorBoard快速入门(Pytorch使用TensorBoard)
随机推荐
[combinatorics] recursive equation (the problem of solving recursive equation with multiple roots | the problem is raised)
[combinatorics] recursive equation (solution of linear non-homogeneous recursive equation with constant coefficients | standard form and general solution of recursive equation | proof of general solut
Golang单元测试、Mock测试以及基准测试
When absolutely positioned, the element is horizontally and vertically centered
How to deploy applications on kubernetes cluster
Servlet specification Part II
Wechat applet for the first time
First day of rhcsa study
Enterprise custom form engine solution (XI) -- form rule engine 1
STM32实现74HC595控制
[combinatorics] recursive equation (four cases where the non-homogeneous part of a linear non-homogeneous recursive equation with constant coefficients is the general solution of the combination of po
[combinatorics] recursive equation (summary of the solution process of recursive equation | homogeneous | double root | non-homogeneous | characteristic root is 1 | exponential form | the bottom is th
List的stream中Long对象与long判等问题记录
聊聊支付流程的設計與實現邏輯
supervisor监控Gearman任务
Leetcode Valentine's Day Special - looking for a single dog
Investigation on the operation prospect of the global and Chinese Anti enkephalinase market and analysis report on the investment strategy of the 14th five year plan 2022-2028
Implementation of Tetris in C language
Graduation summary
QT adjust win screen brightness and sound size