LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 962|回复: 1

小弟请教关于apache负载均衡的问题

[复制链接]
发表于 2005-11-3 15:28:10 | 显示全部楼层 |阅读模式
我在solaris8的平台上安装了一个apache1.3和两个weblogic6.1(在两台主机上)。

使用apache1.3做负载均衡。

两个weblogic没有做成cluster

经编译、配置后可以成功地访问jsp主页。但发现每次登录,连接请求都被分配到其中的一台主机上,而另一台几乎没有分配到连接请求。因为是实验,所以没有几个连接请求。

两台weblogic是正常工作的,从http://202.40.10.186/xhnews/publ ... ebLogicBridgeConfig中可以看到它们的状态。

================New Request: [GET /xhnews/publish/logout.jsp HTTP/1.0] =================
Thu Nov  3 15:02:16 2005 The request string is '/xhnews/publish/logout.jsp'
Thu Nov  3 15:02:16 2005 SEARCHING id=[202.40.10.186:7001,192.168.10.15:7001] from current ID=[202.40.10.186:7001,192.168.10.15:7001]
Thu Nov  3 15:02:16 2005 @@@FOUND...id=[202.40.10.186:7001,192.168.10.15:7001], server_name=[10.93.5.124], server_port=[80]
Thu Nov  3 15:02:16 2005 Init: availcookie=[JSESSIONID=Q2mm1aiXxl3rF5qVgOiwVRs8EyacweM1NmSW2Rq3j0fq8uIOStFG!-416984125!-1062729201!7001!7002]
Thu Nov  3 15:02:16 2005 INFO: SSL is not configured
Thu Nov  3 15:02:16 2005 trying connect to PRIMARY '192.168.10.15'/7001/7002
Thu Nov  3 15:02:16 2005 INFO: New NON-SSL URL
Thu Nov  3 15:02:16 2005 Hdrs from clnt:[Accept]=[image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, */*]
Thu Nov  3 15:02:16 2005 Hdrs from clnt:[Accept-Language]=[zh-cn]
Thu Nov  3 15:02:16 2005 Hdrs from clnt:[Cookie]=[JSESSIONID=Q2mm1aiXxl3rF5qVgOiwVRs8EyacweM1NmSW2Rq3j0fq8uIOStFG!-416984125!-1062729201!7001!7002]
Thu Nov  3 15:02:16 2005 Hdrs from clnt:[Host]=[202.40.10.186]
Thu Nov  3 15:02:16 2005 Hdrs from clnt:[Referer]=[http://202.40.10.186/xhnews/publish/main/banner.jsp]
Thu Nov  3 15:02:16 2005 Hdrs from clnt:[User-Agent]=[Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; .NET CLR 1.1.4322)]
Thu Nov  3 15:02:16 2005 Hdrs to WLS:[Accept]=[image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, */*]
Thu Nov  3 15:02:16 2005 Hdrs to WLS:[Accept-Language]=[zh-cn]
Thu Nov  3 15:02:16 2005 Hdrs to WLS:[Cookie]=[JSESSIONID=Q2mm1aiXxl3rF5qVgOiwVRs8EyacweM1NmSW2Rq3j0fq8uIOStFG!-416984125!-1062729201!7001!7002]
Thu Nov  3 15:02:16 2005 Hdrs to WLS:[Host]=[202.40.10.186]
Thu Nov  3 15:02:16 2005 Hdrs to WLS:[Referer]=[http://202.40.10.186/xhnews/publish/main/banner.jsp]
Thu Nov  3 15:02:16 2005 Hdrs to WLS:[User-Agent]=[Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; .NET CLR 1.1.4322)]
Thu Nov  3 15:02:16 2005 Hdrs to WLS:[WL-Proxy-SSL]=[false]
Thu Nov  3 15:02:16 2005 Hdrs to WLS:[Proxy-Client-IP]=[202.84.17.253]
Thu Nov  3 15:02:16 2005 Hdrs to WLS:[X-Forwarded-For]=[202.84.17.253]
Thu Nov  3 15:02:16 2005 INFO: sysSend 605
Thu Nov  3 15:02:16 2005 INFO: Reader::fill(): first=0 last=0 toRead=4096
Thu Nov  3 15:02:16 2005 Hdrs from WLS:[Date]=[Thu, 03 Nov 2005 07:05:30 GMT]
Thu Nov  3 15:02:16 2005 Hdrs from WLS:[Location]=[http://202.40.10.186/xhnews/publish/login.jsp]
Thu Nov  3 15:02:16 2005 Hdrs from WLS:[Server]=[WebLogic WebLogic Server 6.1 SP1  09/18/2001 14:28:44 #138716 ]
Thu Nov  3 15:02:16 2005 Hdrs from WLS:[Content-Type]=[text/html]
Thu Nov  3 15:02:16 2005 Hdrs from WLS:[Connection]=[Close]
Thu Nov  3 15:02:16 2005 parsed all headers OK
Thu Nov  3 15:02:16 2005 Hdrs to client:[Date]=[Thu, 03 Nov 2005 07:05:30 GMT]
Thu Nov  3 15:02:16 2005 Hdrs to client:[Location]=[http://202.40.10.186/xhnews/publish/login.jsp]
Thu Nov  3 15:02:16 2005 Hdrs to client:[Server]=[WebLogic WebLogic Server 6.1 SP1  09/18/2001 14:28:44 #138716]
Thu Nov  3 15:02:16 2005 INFO: Reader::fill(): first=0 last=0 toRead=4096
Thu Nov  3 15:02:16 2005 INFO: Reader::fill(): first=0 last=0 toRead=4096
Thu Nov  3 15:02:16 2005 r->status=302 returning 0
Thu Nov  3 15:02:16 2005
发表于 2005-11-4 23:52:10 | 显示全部楼层
4.9.  More Magic; Using NAT As a Load Balancer

     Since ipnat is already rewriting packets for us, we can
use it to support one  of  the  simpler  features  of  those
expensive load-balancing systems and assign sessions to mul-
tiple destination addresses.  This is accomplished using the
round-robin keyword:

   rdr tun0 20.20.20.5/32 port 80 -> 192.168.0.5, 192.168.0.6, 192.168.0.7 port 8000
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表