高分求助:哪位大虾对resin的设置比较熟悉?请进!

bsd 2002-04-12 11:56:22
请问你们试过将resin配置为load balancer吗?
有没有成功的案例?
或者
你们有这方面的资料吗?
请高手指点!
谢了先
...全文
19 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
bsd 2002-04-12
  • 打赏
  • 举报
回复
to muly(feather),
应该是可行的,不过我一直没有成功
www.caucho.com竹叶上有相关的介绍(版本比较新)
如下:

Using Resin as the Load Balancer

Resin 2.1 includes a LoadBalanceServlet which will balance requests to backend servers. Because it's implemented as a servlet, this configuration is the most flexible. A site might send all requests for /foo to the backend host 192.168.0.1 and all requests to /bar to the backend host 192.168.0.2. Since Resin has an integrated HTTP proxy cache, the front-end machine can cache results for the backend servers.

Using Resin as the load balancing web server, requires a minimum of two configuration files: one for the load balancing server, and one for the backend servers. The front configuration will dispatch several url-patterns to the backend servers, while the backend will need to actually serve the requests.

The following example sends all URLs starting with /foo to one of the servers in srun-group a.

front.conf <http-server>
<host id='front' port='80'/>

<srun srun-group='a' host='192.168.0.1' port='6802' srun-index='1'/>
<srun srun-group='a' host='192.168.0.2' port='6802' srun-index='2'/>
<srun srun-group='b' host='192.168.0.3' port='6802' srun-index='3'/>

<servlet>
<servlet-name>balance-a</servlet-name>
<servlet-class>com.caucho.http.servlet.LoadBalanceServlet</servlet-class>
<init-param srun-group='a'/>
</servlet>

<servlet-mapping url-pattern='/foo/*' servlet-name='balance-a'/>
</http-server>


The backend server configuration is identical to the server configuration for the hardware load balancer. In general, most sites will use some form of distributed session management.

back.conf for all backend servers <http-server>
<srun id='a' host='192.168.0.1' port='6802' srun-index='1'/>
<srun id='b' host='192.168.0.2' port='6802' srun-index='2'/>

<session-config>
<tcp-store>
</session-config>

...
</http-server>
muly 2002-04-12
  • 打赏
  • 举报
回复
resin好像不能做load balancer,只是cmp版支持ejb
cxhz_cn 2002-04-12
  • 打赏
  • 举报
回复
我一直在用resin, 感觉不错`~~
不过还是有弊端

62,616

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧