Load balancing

From Resin 3.0

Jump to: navigation, search
40px-Edit-clear.png This article requires cleanup and may refer to a legacy version of Resin.

Please visit http://www.caucho.com/documentation/ for the most up-to-date documentation.

Resin documentation is at http://www.caucho.com/resin/doc/balance.xtp

Load balancing spreads the load among multiple backend Resin servers in a Cluster. A frontend Resin server proxies requests to the backend servers and sends the results to the clients.

We'll use as the frontend machine and through as the backend machines.

The frontend server and the backend cluster have different configurations since they perform different roles.


The Frontend Server

  1. dispatches requests to the backend servers, generally using sticky sessions
  2. acts as a Proxy Cache for the backend cluster
  3. pools the proxy sockets for efficiency

The Backend Cluster

  1. does the actual work: the database querying and form processing
  2. manages persistent sessions


The frontend needs to configure:

  1. The external HTTP and HTTPS ports its listening to
  2. The cluster-definition of the backend cluster
  3. A LoadBalanceServlet to dispatch requests to the backend


<resin xmlns="http://caucho.com/ns/resin"
  <cluster id="load-balance">
        <http host="*" port="80"/>

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

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

    <cluster id="app-tier">

         <server id="app-a" address="" port="6800"/>
         <server id="app-b" address="" port="6800"/>
         <server id="app-c" address="" port="6800"/>

          <host id="">
              <web-app-deploy path="webapps"/>
Personal tools