请教章先生及各位有经验的前辈一个DR问题

我的LVS 用linux AS3 +cluster suite 建成;
Vip 192.168.1.20
director 主机eth0:192.168.1.12 GW:192.168.1.1
r1主机: 192.168.1.5 gw: 192.168.1.1
r2主机: 192.168.1.14 gw: 192.168.1.1
DR模式在一个网段里面测试,网关都一样,检测ipvsadm好像只有进的没有出的包。

[root@director root]# ipvsadm -l --stats
IP Virtual Server version 1.0.8 (size=65536)
Prot LocalAddress:Port Conns InPkts OutPkts InBytes OutBytes
-> RemoteAddress:Port
TCP 192.168.1.20:44b 1 5 0 300 0
-> 192.168.1.5:44b 1 5 0 300 0
TCP 192.168.1.20:http 1 5 0 300 0
-> 192.168.1.14:http 1 5 0 300 0
-> 192.168.1.5:http 0 0 0 0 0

但是内网外望都不能正常访问,这是什么原因?

NAT模式正常提供http及另外的tcp端口服务,开始时我的两个virtual servers monitoing scripts都有如下设置:
send: "http GET /..."
expect :"http"
运行结果是http可以起来,但是tcp的另外一个端口服务不能起来。后来我把另外端口的send/expect内容清空后,两个服务都正常。
请问一下这是什么原因,什么验证机制?
谢谢

Forums:

在realserver上,netstat -an看看,如果都是SYN_RECV,那很有可能是没有把VIP设置到本地
网卡上

谢谢解决了,但是还有一些不明白的
由 moveliu 在 周二, 2006-08-15 17:30 提交 *新
我现在ipvsadm -l --stats

[root@director root]# ipvsadm -l --stats
IP Virtual Server version 1.0.8 (size=65536)
Prot LocalAddress:Port Conns InPkts OutPkts InBytes OutBytes
-> RemoteAddress:Port
TCP 192.168.1.20:44b 139 911 0 112650 0
-> 192.168.1.5:44b 56 411 0 48570 0
-> 192.168.1.13:44b 83 500 0 64080 0
TCP 192.168.1.20:http 85 604 0 103607 0
-> 192.168.1.13:http 42 331 0 64584 0
-> 192.168.1.14:http 26 181 0 26187 0
-> 192.168.1.5:http 17 92 0 12836 0
[root@director root]#
显示的out项目都是o,这是什么原因?
另外我的DR server关掉了访问网页照样正常。
性能调优方面有什么好的建议?

out为0很正常,DR模式下,返回的请求是通过网关走的,不通过LD.
看你的conn的数目,还没有到需要调优的地步,看看我的LD的统计(上线一周),LD负载一直
为0:
Prot LocalAddress:Port Conns InPkts OutPkts InBytes OutBytes
-> RemoteAddress:Port
TCP VIP:ldap 74979094 610089K 0 43347M 0
-> RS1:ldap 38181109 309954K 0 22039M 0
-> RS2:ldap 36797985 300134K 0 21308M 0

我的Http及其它应用现在可以访问VIP地址,但是在挂接到上面,没有数据交换的时候好像是每10分钟就会被重置一次。
如果我直接连到realserver的实际IP则没有这种现象。所以我判定肯定是LVS相关设置的问题。但是不知道怎么改,改哪里?
还请各位大虾指导!
谢谢

你可以看看 --persistent 的设置是多长时间?

That's the pefrect insight in a thread like this.

Keep it coming, wrriets, this is good stuff.

Always the best content from these priougdois writers.