resin负载均衡的设置

做个备份


Resin 3.1 pro版本中集群与负载均衡的实现

resin1.conf(9.3 K)

resin-web.conf(8.8 K)

resin-313-cluster-app-1.gif(6.8 K)

resin-313-cluster-app-2.gif(6.8 K)

resin-313-cluster-web-1.gif(6.3 K)

切换到幻灯片模式

需要配置前端web层和后端应用层:

1.web层配置:

<!--
- Configuration for the web-tier/load-balancer
-->
<cluster id="web-tier">
<server-default>
<!-- The http port -->
<http address="*" port="80"/>
</server-default>

<server id="web-a" address="127.0.0.1" port="6700"/>

<cache path="cache" memory-size="64M"/>

<host id="">
<web-app id="/">

<rewrite-dispatch>
<load-balance regexp="" cluster="app-tier"/>
</rewrite-dispatch>

</web-app>
</host>
</cluster>

<cluster id="app-tier">
<server id="a" address="127.0.0.1" port="6800"/>
<server id="b" address="127.0.0.1" port="6801"/>

<persistent-store type="cluster">
<init path="cluster"/>
</persistent-store>

<web-app-default>
<session-config>
<use-persistent-store/>
</session-config>
</web-app-default>

<host id="">
...
</host>
</cluster>


以上配置将来自80的请求分发给app-tier应用层集群处理。

2.应用层集群配置:

<!-- define the servers in the cluster -->
<server id="a" address="127.0.0.1" port="6800"/>
<server id="b" address="127.0.0.1" port="6801"/>


3.启动应用层服务器:
D:\resin-pro-3.1.3\httpd.exe -conf conf/resin1.conf -server a
D:\resin-pro-3.1.3\httpd.exe -conf conf/resin1.conf -server b

以上启动了两个应用服务器a和b.

4.启动前端WEB服务器:
1

> D:\resin-pro-3.1.3\httpd.exe -conf conf/resin-web.conf -server web-a
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值