Comments (7)
@tanxi
sysctl_ip_vs_expire_nodest_conn设为1,见ip_vs_core.c:1162
sysctl
net.ipv4.vs.expire_nodest_conn = 1
from lvs.
@tanxi
sysctl_ip_vs_expire_nodest_conn设为1,见ip_vs_core.c:1162
sysctl
net.ipv4.vs.expire_nodest_conn = 1
非常感谢!我测试一下这个配置。
from lvs.
@tanxi
sysctl_ip_vs_expire_nodest_conn设为1,见ip_vs_core.c:1162
sysctl
net.ipv4.vs.expire_nodest_conn = 1
@jlijian3 你好,我验证了一下这个参数,rs 的 weight 被设置成 0 后,流量立刻被摘掉了,非常感谢!
不过现在又有一个新的不懂之处0-0. 我在网上查询了一下这个参数,然后发现了另外一个参数:expire_quiescent_template,参考的这份文档:https://www.kernel.org/doc/Documentation/networking/ipvs-sysctl.txt
我的理解是,expire_nodest_conn 是对直接从 ipvs 里删除 rs 时生效,expire_quiescent_template 是对把 rs weight 设置成 0 时生效,但是在测试的时候,把 expire_quiescent_template 参数设置成 1,并不能马上摘除流量,而 expire_nodest_conn 这个参数,对是否配置 inhibit_on_failure 参数,都能立马摘除流量。是我的理解错了吗?
from lvs.
@tanxi
expire_quiescent_template是针对配置了 persistence_timeout的vs
weight=0,新建连接不会分配给这个rs,但旧的连接仍然能继续转发包,所以流量不能马上摘除
ipvs删除rs,会把rs状态置为UNAVALIBLE,不会直接删除,已经建立的连接直接丢弃包
expire_nodest_conn = 1 :就是如果rs状态是UNAVALIBLE,已经建立的连接收到包马上超时,从连接表删除,不管你weight是否为0
from lvs.
@tanxi 流量没有马上摘除,估计是因为client和rs重传包
expire_nodest_conn使连接快速超时,重传包没有命中ipvs的连接,DR模式会继续走向协议栈上层,触发内核发送tcp reset。
如果是FULLNAT,NAT的话ipvs会自己发送reset
from lvs.
@tanxi
expire_quiescent_template是针对配置了 persistence_timeout的vs
weight=0,新建连接不会分配给这个rs,但旧的连接仍然能继续转发包,所以流量不能马上摘除
ipvs删除rs,会把rs状态置为UNAVALIBLE,不会直接删除,已经建立的连接直接丢弃包
expire_nodest_conn = 1 :就是如果rs状态是UNAVALIBLE,已经建立的连接收到包马上超时,从连接表删除,不管你weight是否为0
@jlijian3
hi,设置 expire_nodest_conn = 1,当rs状态是UNAVALIBLE时,是LVS会立马返回 reset 给client吧?测试中有看见大量 Connection reset,这样在大流量情况下,还是会影响到服务,有更优雅的方式摘除 RS 吗?
from lvs.
@tanxi
expire_quiescent_template是针对配置了 persistence_timeout的vs
weight=0,新建连接不会分配给这个rs,但旧的连接仍然能继续转发包,所以流量不能马上摘除
ipvs删除rs,会把rs状态置为UNAVALIBLE,不会直接删除,已经建立的连接直接丢弃包
expire_nodest_conn = 1 :就是如果rs状态是UNAVALIBLE,已经建立的连接收到包马上超时,从连接表删除,不管你weight是否为0@jlijian3
hi,设置 expire_nodest_conn = 1,当rs状态是UNAVALIBLE时,是LVS会立马返回 reset 给client吧?测试中有看见大量 Connection reset,这样在大流量情况下,还是会影响到服务,有更优雅的方式摘除 RS 吗?
配置 inhibit_on_failure 后,请求不再有返回 Connection reset
from lvs.
Related Issues (20)
- lvs 可以尝试嵌入 luajit吗? 这样的话用户的可定制更强?就好像nginx + lua 形成 openresty 框架?
- 需要LVS相关技术交流的可以加入
- hash表的主要作用是什么?
- 迁移lvs-fullnat到高版本内核 HOT 6
- 如何让更高版本的内核使用上v2甚至v3版本的patch?有没详细步骤? HOT 3
- 这里的版本和官网linuxvirtualserver.org提供的什么区别? HOT 3
- LVS怎么解决使用127.0.0.1无法访问的问题 HOT 1
- cp: 无法获取"lvs-2.6.32-220.23.1.el6.patch" 的文件状态(stat): 没有那个文件或目录
- lvs调度器针对大流量问题
- Can I forward ipv6(client->director) to ipv4(director->real server) or vice versa HOT 1
- RS为Java程序,无法通过TOA获取源地址
- hello 我使用fullnat 后端rs机器会出现 TcpExt.ListenDrops HOT 2
- no limitation for "%s" while calling fscanf()
- local_address_group 问题请教 HOT 1
- Could I use this module in linux kernel version:4.4.x or 4.15.x in ubuntu?
- 编译 ipvsadm 时报错了:usr/bin/ld: cannot find -lnl
- no limitation for "%s" while calling fscanf()
- ipvsadm connection stats for specific virtual service not working
- Security Vulnerability - Action Required: some unpatched vulnerabilities are detected in your repo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lvs.