Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004673 [Resin] minor always 07-15-11 13:49 07-21-11 16:16
Reporter ferg View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0004673: server/mod_caucho backup
Description (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
--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?

Additional Information
Attached Files

- Relationships

- Notes
(0005387)
ferg
07-21-11 16:16

server/26d4
 

- Issue History
Date Modified Username Field Change
07-15-11 13:49 ferg New Issue
07-21-11 16:16 ferg Note Added: 0005387
07-21-11 16:16 ferg Assigned To  => ferg
07-21-11 16:16 ferg Status new => closed
07-21-11 16:16 ferg Resolution open => fixed
07-21-11 16:16 ferg Fixed in Version  => 4.0.21


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker