On 07/15/2011 06:20 AM, Halvor Utby wrote:
> Hi folks,
>
> We have been testing the Load Balancing possibility in Resin together
> with Apache and it seems the "backup" option for the<server>-tag does
> not work as expected.

I've added a bug report at http://bugs.caucho.com/view.php?id=4673.

The "backup" concept isn't a main configuration option in 4.0 (since we 
generally enforce round-robin as opposed to earlier versions). I'll need 
to check to see if it's something that can be added back.

-- Scott

> Let me explain our setup.
> We have compiled our own Apache. The version we have been using while
> testing Resin is 2.2.17. Resin-pro-4.0.19 was compiled with:
> ./configure --prefix=$RESINHOME --enable-64bit --without-resin-init.d
> --enable-64bit-jni --enable-ssl
> --with-apxs=/path/to/2.2.17-php5.2.17-rhel5-x64-rh/bin/apxs
> --with-apache-libexec=$RESINHOME/apache
>
> I added the "--with-apache-libexec=$RESINHOME/apache" only so our old
> resin-3.x mod_caucho.so not got overwritten. We've done the following
> tests both with mod_caucho.so built for resin-pro-3.1.10 and
> resin-pro-4.0.19.
>
> In our httpd.conf we have:
> <IfModule caucho_module>
> <Location "/app">
>      SetHandler caucho-request
>      ResinConfigServer localhost 6870
> </Location>
> </IfModule>
>
> and in resin.xml we have:
>    ...<!-- Not important, hence not included -->
> <cluster-default>
>    <resin:import path="${resin.home}/conf/app-default.xml"/>
>    <resin:if test="${isResinProfessional}">
>      <cache path="cache" memory-size="64M"/>
>    </resin:if>
>    <ignore-client-disconnect>true</ignore-client-disconnect>
>    <resin:DeployService/>
>    <resin:if test="${resin.professional}">
>      <resin:import path="${resin.home}/conf/health.xml"/>
>      <resin:JmxService/>
>      <resin:LogService/>
>      <resin:StatService/>
>      <resin:XaLogService/>
>    </resin:if>
> </cluster-default>
>
> <cluster id="app">
>    <ssl-session-cookie>SSL_APPID</ssl-session-cookie>
>    <session-cookie>APPID</session-cookie>
>    <server id="app-1" address="127.0.0.1" port="6870"/>
>    <server id="app-2" address="127.0.0.1" port="6871" backup="true" />
>    ...<!-- Not important, hence not included -->
>    <host id="host.example.com">
>        <web-app-deploy path="/path/to/app/${resin.serverId}"
>                 archive-directory="/path/to/app"
>                 expand-directory="/path/to/app/${resin.serverId}"/>
>        <web-app id="/app"
>                 root-directory="/path/to/app/${resin.serverId}/app">
>        <cookie-http-only>true</cookie-http-only>
>        <session-config>
>          <reuse-session-id>false</reuse-session-id>
>          <use-persistent-store/>
>          <always-save-session/>
>        </session-config>
>        ...<!-- Not important, hence not included -->
>        </web-app>
>    </host>
> </cluster>
>
> As you can see we followed the documentation on
> http://caucho.com/resin-4.0/admin/starting-resin-apache.xtp, except not
> including the "index" option in the<server>-tag which is not recognized.
> Still we see that sessions, more or less random, goes to both app-1 and
> app-2. That is, when a session is established it always goes to the same
> server, however if I delete the cookie a new session might go to the
> "backup-node" app-2. The documentation says: "Optional backup machines
> only receive requests if all of the primaries are down."
>
> We have verified through resin-admin that app-1 and app-2 can talk to
> each other.
>
> What are we doing wrong, since backup="true" does not seem to work as we
> expected?
>



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to