Mantis - Resin
Viewing Issue Advanced Details
4673 minor always 07-15-11 13:49 07-21-11 16:16
none 4.0.21  
0004673: server/mod_caucho backup
(rep by Halvor Utby)

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.

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

I added the "--with-apache-libexec=$RESINHOME/apache" only so our old
resin-3.x not got overwritten. We've done the following
tests both with built for resin-pro-3.1.10 and

In our httpd.conf we have:
<IfModule caucho_module>
<Location "/app">
    SetHandler caucho-request
    ResinConfigServer localhost 6870

and in resin.xml we have:
  ... <!-- Not important, hence not included -->
  <resin:import path="${resin.home}/conf/app-default.xml"/>
  <resin:if test="${isResinProfessional}">
    <cache path="cache" memory-size="64M"/>
  <resin:if test="${resin.professional}">
    <resin:import path="${resin.home}/conf/health.xml"/>

<cluster id="app">
  <server id="app-1" address="" port="6870"/>
  <server id="app-2" address="" port="6871" backup="true" />
  ... <!-- Not important, hence not included -->
  <host id="">
      <web-app-deploy path="/path/to/app/${resin.serverId}"
      <web-app id="/app"
      ... <!-- Not important, hence not included -->

As you can see we followed the documentation on, [^] 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

07-21-11 16:16