免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2171 | 回复: 4
打印 上一主题 下一主题

LVS_DR 下squid 连接不能通过!! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-12-04 00:07 |只看该作者 |倒序浏览
LB
eth0:        211.123.23.10
eth0:0 (VIP) 202.121.17.16

LD
eth0:        202.121.17.17
lo:0         202.121.17.16

ldirectord.cf配置如下

checktimeout=3
checkinterval=11
fallback=127.0.0.1:80
autoreload=yes
logfile="/var/log/ldirectord.log"
#logfile="local0"
quiescent=yes

# A sample virual with a fallback that will override the gobal setting
virtual=202.121.17.16:80
        real=202.121.17.17:80 gate
        fallback=127.0.0.1:80 gate
        service=http
        request="real.html"
        receive="OK"
        virtualhost=202.121.17.17
        scheduler=rr
        #persistent=600
        #netmask=255.255.255.255
        protocol=tcp
ipvsadm -lnc
pro expire state       source             virtual            destination
TCP 00:47 SYN_RECV 211.123.23.18:2504 202.121.17.16:80 202.121.17.17:80  
TCP 00:41 SYN_RECV 211.123.23.18:2501 202.121.17.16:80 202.121.17.17:80

realserver中的squid监听在80上
若停掉realserver中的squid ,同时在realserver中开启httpd服务,则 ipvsadm -lnc连接正常。
也就是说现在realserver上的squid不能通过 VIP来访问?

[ 本帖最后由 mb 于 2007-12-4 00:08 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-12-04 10:56 |只看该作者
不能指定IP监听,哎!!

论坛徽章:
0
3 [报告]
发表于 2007-12-10 11:10 |只看该作者
晕饿。。没的解决?你的配置文档还有没,给看下饿

论坛徽章:
0
4 [报告]
发表于 2008-01-09 09:02 |只看该作者
可以指定port,要是有条件的话就分离cache最好,放在一起squid和web就指定不同port来解决吧

论坛徽章:
0
5 [报告]
发表于 2008-01-09 09:16 |只看该作者
楼主考虑一下 squid 的 parent cache and sibling cache 我看你用的是轮询,squid本身就支持轮询的群集啊。
例如:

  1. cache_peer 192.168.100.248 parent 8080 0 round-robin no-query no-digest no-netdb-exchange
  2. cache_peer 192.168.100.249 parent 8080 0 round-robin no-query no-digest no-netdb-exchange
  3. cache_peer 192.168.100.250 parent 8080 0 round-robin no-query no-digest no-netdb-exchange
  4. cache_peer 192.168.100.251 parent 8080 0 round-robin no-query no-digest no-netdb-exchange
  5. cache_peer 192.168.100.252 parent 8080 0 round-robin no-query no-digest no-netdb-exchange
  6. cache_peer_access 192.168.100.248 allow all
  7. cache_peer_access 192.168.100.249 allow all
  8. cache_peer_access 192.168.100.250 allow all
  9. cache_peer_access 192.168.100.251 allow all
  10. cache_peer_access 192.168.100.252 allow all
复制代码

而且从ldirectord源码看出他对apache的检测过程就是从那台主机访问request=的资源,看结构是否与receive="OK"相同。
而你直接访问你代理的80端口显然是错误的 。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP