Primary and backup servers

WAS V5.1 introduces a new plug-in feature called primary and backup servers. The plugin-cfg.xml when generated will have a tag called PrimaryServers, which is an ordered list of servers to which to send requests. There is also an optional tag called BackupServers. This is an ordered list of servers to which requests should be sent to if all servers specified in the PrimaryServers list are unavailable. The plug-in does not load balance across the BackupServers list but traverses the list in order until no servers are left in the list or until a request is successfully sent and a response received from an appserver.

Note: The plugin-cfg.xml file must be edited manually to add backup servers.

All appserver details are listed in ServerCluster with the primary and backup server list being used as a pointer to those hosts that you want to specify as backup or primary servers. This is illustrated in Example 5-6.

Example 5-6 ServerCluster element depicting primary and backup servers.

<ServerCluster CloneSeparatorChange="false" 
               LoadBalance="Round Robin" 
               Name="PluginCluster" 
               PostSizeLimit="-1" 
               RemoveSpecialHeaders="true" 
               RetryInterval="60">
      <Server CloneID="v544d031" 
              ConnectTimeout="0" 
              ExtendedHandshake="false" 
              LoadBalanceWeight="8" 
              MaxConnections="-1" 
              Name="was1node_PluginMember1" 
              WaitForContinue="false">
         <Transport Hostname="app1.itso.ibm.com" Port="9088" Protocol="http"/>
         <Transport Hostname="app1.itso.ibm.com" Port="9447" Protocol="https">
            <Property Name="keyring" Value="C:\WebSphere\AppServer\etc\plugin-key.kdb"/>
            <Property Name="stashfile" Value="C:\WebSphere\AppServer\etc\plugin-key.sth"/>
         </Transport>
      </Server>
      <Server CloneID="v544d0o0" 
              ConnectTimeout="0" 
              ExtendedHandshake="false" 
              LoadBalanceWeight="2" 
              MaxConnections="-1" 
              Name="was2Node_PluginMember2" 
              WaitForContinue="false">
         <Transport Hostname="app2.itso.ibm.com" Port="9086" Protocol="http"/>
         <Transport Hostname="app2.itso.ibm.com" Port="9447" Protocol="https">
            <Property Name="keyring" Value="C:\WebSphere\AppServer\etc\plugin-key.kdb"/>
            <Property Name="stashfile" Value="C:\WebSphere\AppServer\etc\plugin-key.sth"/>
         </Transport>
      </Server>
      <Server CloneID="v54deevk" 
              ConnectTimeout="0" 
              ExtendedHandshake="false" 
              LoadBalanceWeight="2" 
              MaxConnections="-1" 
              Name="was1node_PluginMember3" 
              WaitForContinue="false">
         <Transport Hostname="app1.itso.ibm.com" Port="9093" Protocol="http"/>
         <Transport Hostname="app1.itso.ibm.com" Port="9448" Protocol="https">
            <Property Name="keyring" Value="C:\WebSphere\AppServer\etc\plugin-key.kdb"/>
            <Property Name="stashfile" Value="C:\WebSphere\AppServer\etc\plugin-key.sth"/>
         </Transport>
      </Server>
      <Server CloneID="v54defqf" 
              ConnectTimeout="0" 
              ExtendedHandshake="false" 
              LoadBalanceWeight="2" 
              MaxConnections="-1" 
              Name="was2Node_PluginMember4" 
              WaitForContinue="false">
         <Transport Hostname="app2.itso.ibm.com" Port="9089" Protocol="http"/>
         <Transport Hostname="app2.itso.ibm.com" Port="9448" Protocol="https">
            <Property Name="keyring" Value="C:\WebSphere\AppServer\etc\plugin-key.kdb"/>
            <Property Name="stashfile" Value="C:\WebSphere\AppServer\etc\plugin-key.sth"/>
         </Transport>
      </Server>
      <PrimaryServers>
         <Server Name="was1node_PluginMember1"/>
         <Server Name="was2Node_PluginMember2"/>
      </PrimaryServers>
      <BackupServers>
         <Server Name="was1node_PluginMember3"/>
         <Server Name="was2Node_PluginMember4"/>
      </BackupServers>
   </ServerCluster>

 

The backup server list is only used when all primary servers are down. Figure 5-11 shows this process in detail.

Figure 5-11 Primary and Backup server selection process

  1. The request comes in and is sent to the plug-in.

  2. The plug-in chooses the next primary server, checks whether the cluster member has been marked down and the retry interval. If it has been marked down and the retry timer is not 0, it continues to the next cluster member.

  3. A stream is opened to the appserver (if not already open) and a connection is attempted.

  4. The connection to the cluster member fails. When a connection to a cluster member has failed, the process begins again.

  5. The plug-in repeats steps 2, 3 and 4 until all primary servers are marked down.

  6. When all primary servers are marked as down, the plug-in will then repeat steps 2 and 3 with the backup server list.

  7. It performs steps 2 and 3 with a successful connection to the backup server. Data is sent to the Web container and is then returned to the user. If the connection is unsuccessful, the plug-in will then go through all the primary servers again and then all the servers marked down in the backup server list until it reaches a backup server that is not marked down.

  8. If another requests comes in and one of the primary server's retry timer is at 0 the plug-in will try and connect to it.

  Prev | Home | Next

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.