View Full Version : Resin Configuration for load balancing

06-15-2010, 11:59 AM
Dear All,
I am having our web application using resin. Where in the first page there is a link for login. If it is clicked one page with SSL encryption opens. There we need to put username password and group name for authentication. It communicates through cobra (Iona/Progress) based communication. In a single server it is working fine.
Now we have two web servers and I want to balance load through web-tier.
At present I am running web-tier in one machine and app-tier in other machine.
From web-tier I am able to connect to first page only. If I click for login, system gives error as ??System cannot display this webpage??.
What should I do to achieve the requirement. I am attaching my resin.conf file below:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- Resin 3.1 configuration file.
<resin xmlns="http://caucho.com/ns/resin"

<!-- adds all .jar files under the resin/lib directory -->
<tree-loader path="${resin.home}/ext-lib"/>
<tree-loader path="${resin.root}/ext-lib"/>

<tree-loader path="${resin.home}/lib"/>
<tree-loader path="${resin.root}/lib"/>

<management path="${resin.root}/admin">
<user name="admin" password="password" disable="true"/>

<resin:if test="${resin.professional}">

<log name="" level="info" path="stdout:"
timestamp="[%H:%M:%S.%s] {%{thread}} "/>

<logger name="com.caucho" level="info"/>

<logger name="com.caucho.java" level="config"/>
<logger name="com.caucho.loader" level="config"/>


<system-property mail.smtp.host=""/>
<system-property mail.smtp.port="25"/>


<javac compiler="internal" args="-source 1.5"/>

<cluster id="app-tier">
<!-- sets the content root for the cluster, relative to server.root -->

<!-- The http port -->
<http address="*" port="7070"/>

<http address="*" port="6443">




<!-- Maximum number of threads. -->

<!-- Configures the socket timeout -->

<!-- Configures the keepalive -->


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

<resin:if test="${resin.professional}">
<persistent-store type="cluster">
<init path="session"/>

<resin:if test="${resin.professional}">
<cache path="cache" memory-size="64M">
<!-- Vary header rewriting for IE -->


<tree-loader path="${resin.root}/ext-webapp-lib"/>

- Enable EL expressions in Servlet and Filter init-param

- Sets timeout values for cacheable pages, e.g. static pages.
<cache-mapping url-pattern="/" expires="5s"/>
<cache-mapping url-pattern="*.gif" expires="60s"/>
<cache-mapping url-pattern="*.jpg" expires="60s"/>
<cache-mapping url-pattern="*.png" expires="60s"/>

- for security, disable session URLs by default.

- For security, set the HttpOnly flag in cookies.
- <cookie-http-only/>

- Some JSP packages have incorrect .tld files. It's possible to
- set validate-taglib-schema to false to work around these packages.

<!-- includes the app-default for default web-app behavior -->
<resin:import path="${resin.home}/conf/app-default.xml"/>


<access-log path="logs/access.log"
format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'

<!-- creates the webapps directory for .war expansion -->
<web-app-deploy path="webapps"/>

<!-- creates the deploy directory for .ear expansion -->
<ear-deploy path="deploy">

<!-- creates the deploy directory for .rar expansion -->
<resource-deploy path="deploy"/>

<!-- configures a deployment directory for virtual hosts -->
<host-deploy path="hosts">
<resin:import path="host.xml" optional="true"/>

<!-- configures the default host, matching any host name -->
<host id="" root-directory=".">
- configures an explicit root web-app matching the
- webapp's ROOT
<web-app id="/" root-directory="webapps/ROOT"/>

<web-app id="/resin-admin" root-directory="${resin.home}/php/admin">
- Administration application /resin-admin
<resin:set var="resin_admin_external" value="false"/>
<resin:set var="resin_admin_insecure" value="true"/>

<cluster id="web-tier">
<!-- The http port -->
<http address="*" port="7080"/>

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

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

<host id="" root-directory="web-tier">
<web-app id="/">

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