keepalived的配置文件
! Configuration File for keepalived
global_defs {
notification_email {
# acassen@firewall.loc
# failover@firewall.loc
# sysadmin@firewall.loc
}
# notification_email_from Alexandre.Cassen@firewall.loc
# smtp_server 192.168.200.1
# smtp_connect_timeout
# router_id LVS_DEVEL
# vrrp_skip_check_adv_addr
# vrrp_strict
# vrrp_garp_interval
# vrrp_gna_interval
}
vrrp_instance VI_1 {
state MASTER
interface ens33
virtual_router_id
priority
advert_int
authentication {
auth_type PASS
auth_pass
}
virtual_ipaddress {
192.168.193.252
}
}
virtual_server 192.168.193.252 {
delay_loop
lb_algo rr
lb_kind DR
persistence_timeout
protocol TCP
real_server 192.168.193.80 {
weight
HTTP_GET {
url {
path /
state_code
}
connect_timeout
nb_get_retry
delay_before_retry
}
}
}
virtual_server 192.168.193.252 {
delay_loop
lb_algo rr
lb_kind DR
persistence_timeout
protocol TCP
real_server 192.168.193.81 {
weight
HTTP_GET {
url {
path /
state_code
}
connect_timeout
nb_get_retry
delay_before_retry
}
}
}
#virtual_server 10.10.10.2 {
# delay_loop
# lb_algo rr
# lb_kind NAT
# persistence_timeout
# protocol TCP
#
# sorry_server 192.168.200.200
#
# real_server 192.168.200.2 {
# weight
# HTTP_GET {
# url {
# path /testurl/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334d
# }
# url {
# path /testurl2/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334d
# }
# url {
# path /testurl3/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334d
# }
# connect_timeout
# nb_get_retry
# delay_before_retry
# }
# }
#
# real_server 192.168.200.3 {
# weight
# HTTP_GET {
# url {
# path /testurl/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334c
# }
# url {
# path /testurl2/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334c
# }
# connect_timeout
# nb_get_retry
# delay_before_retry
# }
# }
#}
#
#virtual_server 10.10.10.3 {
# delay_loop
# lb_algo rr
# lb_kind NAT
# persistence_timeout
# protocol TCP
#
# real_server 192.168.200.4 {
# weight
# HTTP_GET {
# url {
# path /testurl/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334d
# }
# url {
# path /testurl2/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334d
# }
# url {
# path /testurl3/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334d
# }
# connect_timeout
# nb_get_retry
# delay_before_retry
# }
# }
#
# real_server 192.168.200.5 {
# weight
# HTTP_GET {
# url {
# path /testurl/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334d
# }
# url {
# path /testurl2/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334d
# }
# url {
# path /testurl3/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334d
# }
# connect_timeout
# nb_get_retry
# delay_before_retry
# }
# }
#}
node2
! Configuration File for keepalived
global_defs {
notification_email {
# acassen@firewall.loc
# failover@firewall.loc
# sysadmin@firewall.loc
}
# notification_email_from Alexandre.Cassen@firewall.loc
# smtp_server 192.168.200.1
# smtp_connect_timeout
# router_id LVS_DEVEL
# vrrp_skip_check_adv_addr
# vrrp_strict
# vrrp_garp_interval
# vrrp_gna_interval
}
vrrp_instance VI_1 {
state BACKUP
interface ens33
virtual_router_id
priority
advert_int
authentication {
auth_type PASS
auth_pass
}
virtual_ipaddress {
192.168.193.252
}
}
virtual_server 192.168.193.252 {
delay_loop
lb_algo rr
lb_kind DR
persistence_timeout
protocol TCP
real_server 192.168.193.80 {
weight
HTTP_GET {
url {
path /
state_code
}
connect_timeout
nb_get_retry
delay_before_retry
}
}
}
virtual_server 192.168.193.252 {
delay_loop
lb_algo rr
lb_kind DR
persistence_timeout
protocol TCP
real_server 192.168.193.81 {
weight
HTTP_GET {
url {
path /
state_code
}
connect_timeout
nb_get_retry
delay_before_retry
}
}
}
#virtual_server 10.10.10.2 {
# delay_loop
# lb_algo rr
# lb_kind NAT
# persistence_timeout
# protocol TCP
#
# sorry_server 192.168.200.200
#
# real_server 192.168.200.2 {
# weight
# HTTP_GET {
# url {
# path /testurl/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334d
# }
# url {
# path /testurl2/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334d
# }
# url {
# path /testurl3/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334d
# }
# connect_timeout
# nb_get_retry
# delay_before_retry
# }
# }
#
# real_server 192.168.200.3 {
# weight
# HTTP_GET {
# url {
# path /testurl/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334c
# }
# url {
# path /testurl2/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334c
# }
# connect_timeout
# nb_get_retry
# delay_before_retry
# }
# }
#}
#
#virtual_server 10.10.10.3 {
# delay_loop
# lb_algo rr
# lb_kind NAT
# persistence_timeout
# protocol TCP
#
# real_server 192.168.200.4 {
# weight
# HTTP_GET {
# url {
# path /testurl/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334d
# }
# url {
# path /testurl2/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334d
# }
# url {
# path /testurl3/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334d
# }
# connect_timeout
# nb_get_retry
# delay_before_retry
# }
# }
#
# real_server 192.168.200.5 {
# weight
# HTTP_GET {
# url {
# path /testurl/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334d
# }
# url {
# path /testurl2/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334d
# }
# url {
# path /testurl3/test.jsp
# digest 640205b7b0fc66c1ea91c463fac6334d
# }
# connect_timeout
# nb_get_retry
# delay_before_retry
# }
# }
#}
keepalived的配置文件的更多相关文章
- keepalived+nginx配置文件及检查nginx服务的脚本
脚本一启动的速度要快一些哦,因为脚本二要判断两次以后才启动哎 这两个一般配合keepalived使用 脚本一: #!/bin/bash #author:fansik #description:chec ...
- keepalived.conf 配置文件小结
vrrp_script vs_mysql_82 { script "/etc/keepalived/checkMySQL.py -h 192.168.11.82 -P 3306&qu ...
- 高可用之keepalived的配置文件详解
! Configuration File for keepalived global_defs { notification_email { acassen@firewall.loc failover ...
- 配置文件keepalived.conf详解
keepalived.conf 一个功能比较完整的keepalived 的配置文件,其配置文件keepalived.conf 可以包含三个文本块:全局定义块.VRRP 实例定义块及虚拟服务 ...
- keepalived配置文件
1. 查看进程 ps aux | grep keepalived ,其输出为: [root@lvs-m ~]# ps aux| grep keepalived |grep -v greproot 21 ...
- 高可用之KeepAlived(一):基本概念和配置文件分析
*/ .hljs { display: block; overflow-x: auto; padding: 0.5em; color: #333; background: #f8f8f8; } .hl ...
- keepalived工作原理和配置文件说明
keepalived是什么 keepalived是集群管理中保证集群高可用的一个服务软件,其功能类似于heartbeat,用来防止单点故障. keepalived工作原理 keepalived是以VR ...
- keepalived原理(主从配置+haproxy)及配置文件详解
下图描述了使用keepalived+Haproxy主从配置来达到能够针对前段流量进行负载均衡到多台后端web1.web2.web3.img1.img2.但是由于haproxy会存在单点故障问题,因此使 ...
- Keepalived 配置文件
keepalived的配置文件: keepalived只有一个配置文件keepalived.conf,里面主要包括以下几个配置区域,分别是global_defs. 全局定义及 ...
随机推荐
- adaboost面试题
1.简述权值更新方法 (1)初始化权值分布: (2)找到误差最小的弱分类器: (3)计算弱分类器的权值: (4)更新下一轮样本的权值分布: (5)集合多个弱分类器成一个最终的强分类器. 2.为什么能快 ...
- Java 线程状态有哪些?
线程状态有 5 种,新建,就绪,运行,阻塞,死亡.关系图如下: 1. 线程 start 方法执行后,并不表示该线程运行了,而是进入就绪状态,意思是随时准备运行,但是真正何时运行,是由操作系统决定的,代 ...
- PHP代码修改后提交,无法立即生效
今天遇到一个坑爹的问题,就是我修改了PHP代码,提交到网站根目录以后,刷新浏览器居然无法立即生效,差不多得一分钟的样子再去刷新,才会看到更改后的效果. 出现这个问题的原因,是因为手头的项目需要较高的P ...
- 高清摄像头MIPI接口与ARM连接【转】
本文转载自:http://www.cnblogs.com/whw19818/p/5811299.html MIPI摄像头常见于手机.平板中,支持500万像素以上高清分辨率.它的全称为“Mobile I ...
- nginx 和 php
sudo apt-get install nginx sudo groupadd www sudo useradd -g www www /etc/nginx/nginx.conf service n ...
- .Net Core使用IConfiguration来处理Json文件
前几天公司的用上了携程的开源配置中心:Apollo 然后同事给我提了这么个问题,因为之前的时候我们用的都是.NET Core自带的appsetting.json,为了兼容代码的目前工具类中用来进行配置 ...
- 《计算机程式设计》Week4 课堂笔记
本笔记记录自 Coursera课程 <计算机程式设计> 台湾大学 刘邦锋老师 Week4 Functions 4-1 System Function 函数主要分为两大类系统定义函数与使用者 ...
- Vue Router:使用 props 将组件和路由解耦
在组件中使用 $route 会使之与其对应路由形成高度耦合,从而使组件只能在某些特定的 URL 上使用,限制了其灵活性. 可以使用 props 将组件和路由解耦. 一 路由配置(布尔模式): impo ...
- 20191105 《Spring5高级编程》笔记-第6章
第6章 Spring JDBC支持 Spring官方: 位于Spring Framework Project下. 文档: https://docs.spring.io/spring-framework ...
- Angular5 import interface 报错:XXX is not a module
在项目里定义了一个interface,device.ts.然后在component.ts中要使用这个interface,import之后,VSCode报错:‘xxx/xxx/xxx/device.ts ...