Load balancing and clustering


Summary
Web Mapping Applications can be distributed by deploying them to an ArcGIS for Server cluster. A distributed Web Mapping Application can provide better performance since multiple machines can handle more load than one. Clusters also provide high availability where if one machine goes down, clients can connect to another server transparently.

About load balancing and clustering

The Java Web Application Developer Framework (ADF) Internet resources (such as WMS, ArcIMS Internet connections, and ArcGIS for Server Internet connections) that connect through a uniform resource locator (URL) were designed to use existing clustering technology that users would already have. Clustering technology makes it possible to use a single URL to connect to one of a pool of machines.  The Internet resources simply take a URL that goes to a cluster. No extra work is needed to configure your application to use the Web server cluster.  
The ArcGIS for Server local connection (DCOM for ArcGIS for Server) is the exception. There is no third-party product that allows clustering of DCOM servers like there is for Web servers. This functionality is important, so it's possible to configure clustering through our Java Web ADF even though it requires special steps to configure as shown in the following Web Mapping Application scenario. 
The two types of applications that you can set up to utilize ArcGIS for Server in a round-robin or failover scenario are as follows:
  1. Web Map Application (must be an ArcGIS for Server Local connection)
    1. You need to edit the application's facesconfig.xml file to allow connections to multiple SOMs in a round-robin or failover fashion.
    2. This is done by adding more hosts to the managed property "hosts" and adding a new managed property called "clusterType".
    3. For example, add the following to your facesconfig.xml file:
[XML]
<!-- Edit the hosts managed-property values -->
<managed-property>
  <property-name>hosts</property-name>
  <list-entries>
    <!-- Add values for your SOM servers -->
    <value>arcgis1.esri.com</value>
    <value>arcgis2.esri.com</value>
  </list-entries>
</managed-property>
<!-- Add a new clusterType managed-property -->
<managed-property>
  <property-name>clusterType</property-name>
  <value>roundrobin</value>
</managed-property>
  1. Web Service Handler (WSH)
    1. Using ArcGIS Server Manager, click the Services tab and select Configure Services Handler.
    2. Select the Export tab.
    3. Under Export Web Services, select the type of service you want to export (REST or Web).
    4. Fill in the appropriate GIS server credentials to connect to.
    5. Select the Yes radio button under Do you have additional GIS Servers in your site that you would like to use for a failover or round-robin configuration? and add the appropriate GIS servers. See the following screen shot:
 
 
    1. Once complete, export your application and deploy to a supported application server. 
The username and password used must be able to connect to all the GIS servers in the cluster for both application types.