<!--
   - A sample load balancing configuration
   -
   - Two primary JVMs share the load.  The backup JVMs are only used
   - when both primaries fail.
   -
   - The primary hosts can share the same configuration.  Each host
   - will pick up the srun-port of 6810, and Apache will
   - use the <srun> elements.
   -
   - Note: It may be more convenient to configure virtual hosting in
   - Apache.  Then the resin.conf doesn't need the srun and srun-backup
   - configurations.  The equivalent configuration in Apache's httpd.conf is:
   -
   - CauchoHost host1.acme.com 6810
   - CauchoHost host2.acme.com 6810
   - CauchoBackup host3.acme.com 6810
   - CauchoBackup host4.acme.com 6810
   -
   - If you use two Apache servers, the second one could reverse primary
   - and secondary JVMs
   -
   - CauchoHost host3.acme.com 6810
   - CauchoHost host4.acme.com 6810
   - CauchoBackup host1.acme.com 6810
   - CauchoBackup host2.acme.com 6810
  -->
<caucho.com>
  <!-- The tcp-server log gives some useful load information -->
  <log id='/caucho.com/tcp-server' href='stderr:'/>

  <http-server app-dir='doc' srun-port='6810'>
    <!--
       - host1 and host2 are the primary JVMs
      -->
    <srun server='a' host='host1.acme.com' port='6810'/>
    <srun server='b' host='host2.acme.com' port='6810'/>

    <!-- 
       - host3 and host4 are the backup JVMs.  They'll only be used
       - if both host1 and host2 fail
      -->
    <srun-backup server='c' host='host3.acme.com' port='6810'/>
    <srun-backup server='d' host='host4.acme.com' port='6810'/>

    <error-log id='log/error.log'/>
  </http-server>
</caucho.com>
