+

Search Tips   |   Advanced Search

Switching progressively the HTTP traffic to the new cluster, with session affinity

You must modify the HTTP plug-in file to route the HTTP traffic to the new installation of IBM MobileFirst Platform Foundation

The following procedure requires modifications of the HTTP plug-in file, plugin-cfg.xml. Before you perform this procedure in production, you must test it in a test environment.

Important: If errors occur during these steps, it would result in incorrect traffic routing and might impact all applications in the cell of the WebSphere Application Server.

The procedure to route the traffic is based on the following properties of the web plug-in:

For more information about updating the plugin-cfg.xml file, see Set up IBM MobileFirst Platform Foundation in WebSphere Application Server cluster environment.

  1. Progressively, set the weight of a server in the cluster_WL61 to 0.

  2. Move a server of the cluster cluster_WL61FP1 to the definition of cluster_WL61, with a weight of 2.

  3. Wait for the server in cluster cluster_WL61 to drain so that most of the session terminates and that it stops using CPU resources.

  4. Repeat the procedure for the next server.


Example

Before you start the procedure:

<ServerCluster LoadBalance="Round Robin" Name="cluster_WL61">
  <Server CloneID="a8er1kj2" LoadBalanceWeight="2" Name="ServerWL61_1">
    <Transport Hostname="test1.ibm.com" Port="9081" Protocol="http"/>
  </Server>
  <Server CloneID="a8er2kd3" LoadBalanceWeight="2" Name="ServerWL61_2">
    <Transport Hostname="test2.ibm.com" Port="9082" Protocol="http"/>
  </Server>
  <Server CloneID="a8es3as1" LoadBalanceWeight="2" Name="ServerWL61_3">
    <Transport Hostname="test3.ibm.com" Port="9083" Protocol="http"/>
  </Server>
  <PrimaryServers>
    <Server Name="ServerWL61_1"/>
    <Server Name="ServerWL61_2"/>
    <Server Name="ServerWL61_3"/>
  </PrimaryServers>
</ServerCluster>
[...]
<ServerCluster LoadBalance="Round Robin" Name="cluster_WL61FP1">
  <Server CloneID="a8sd1kj2" LoadBalanceWeight="0" Name="ServerWL61FP1_1">
    <Transport Hostname="test1.ibm.com" Port="9084" Protocol="http"/>
  </Server>
  <Server CloneID="a8as2kd3" LoadBalanceWeight="0" Name="ServerWL61FP1_2">
    <Transport Hostname="test2.ibm.com" Port="9085" Protocol="http"/>
  </Server>
  <Server CloneID="a8qa3as1" LoadBalanceWeight="0" Name="ServerWL61FP1_3">
    <Transport Hostname="test3.ibm.com" Port="9086" Protocol="http"/>
  </Server>
  <PrimaryServers>
    <Server Name="ServerWL61FP1_1"/>
    <Server Name="ServerWL61FP1_2"/>
    <Server Name="ServerWL61FP1_3"/>
  </PrimaryServers>
</ServerCluster>
[...]
<!-- Example of the UriGroups and Routes. They are not changed while you switch the traffic -->
<UriGroup Name="prod_vhost_cluster_WL61_URIs">
  <Uri AffinityCookie="JSESSIONID"
       AffinityURLIdentifier="jsessionid" Name="/worklightconsole/*"/>
  <Uri AffinityCookie="JSESSIONID"
       AffinityURLIdentifier="jsessionid" Name="/worklightadmin/*"/>
  <Uri AffinityCookie="JSESSIONID"
       AffinityURLIdentifier="jsessionid" Name="/worklight/*"/>
</UriGroup>
<Route ServerCluster="ClusterX"
  UriGroup="prod_vhost_cluster_WL61_URIs" VirtualHostGroup="default_host"/>
<UriGroup Name="test_vhost_cluster_WL61FP1_URIs">
  <Uri AffinityCookie="JSESSIONID"
       AffinityURLIdentifier="jsessionid" Name="/worklightconsole/*"/>
  <Uri AffinityCookie="JSESSIONID"
       AffinityURLIdentifier="jsessionid" Name="/worklightadmin/*"/>
  <Uri AffinityCookie="JSESSIONID"
       AffinityURLIdentifier="jsessionid" Name="/worklight/*"/>
</UriGroup>
<Route ServerCluster="ClusterY" UriGroup="test_vhost_cluster_WL61FP1_URIs"
  VirtualHostGroup="test_host"/>

Move a server:

<ServerCluster LoadBalance="Round Robin" Name="cluster_WL61">
  <!-- Server ServerWL61_1 has a weight of 0 -->
  <Server CloneID="a8er1kj2" LoadBalanceWeight="0" Name="ServerWL61_1">
    <Transport Hostname="test1.ibm.com" Port="9081" Protocol="http"/>
  </Server>
  <Server CloneID="a8er2kd3" LoadBalanceWeight="2" Name="ServerWL61_2">
    <Transport Hostname="test2.ibm.com" Port="9082" Protocol="http"/>
  </Server>
  <Server CloneID="a8es3as1" LoadBalanceWeight="2" Name="ServerWL61_3">
    <Transport Hostname="test3.ibm.com" Port="9083" Protocol="http"/>
  <!-- Server ServerWL61F1_1 added to the cluster_WL61 in the plugin-cfg file -->
  <Server CloneID="a8sd1kj2" LoadBalanceWeight="2" Name="ServerWL61FP1_1">
    <Transport Hostname="test1.ibm.com" Port="9084" Protocol="http"/>
  </Server>
  <PrimaryServers>
    <Server Name="ServerWL61_1"/>
    <Server Name="ServerWL61_2"/>
    <Server Name="ServerWL61_3"/>
    <Server Name="ServerWL61FP1_1"/>
  </PrimaryServers>
</ServerCluster>
[...]
<ServerCluster LoadBalance="Round Robin" Name="cluster_WL61FP1">
  <Server CloneID="a8as2kd3" LoadBalanceWeight="0" Name="ServerWL61FP1_2">
    <Transport Hostname="test2.ibm.com" Port="9085" Protocol="http"/>
  </Server>
  </Server>
  <Server CloneID="a8qa3as1" LoadBalanceWeight="0" Name="ServerWL61FP1_3">
    <Transport Hostname="test3.ibm.com" Port="9086" Protocol="http"/>
  </Server>
  <PrimaryServers>
    <Server Name="ServerWL61FP1_2"/>
    <Server Name="ServerWL61FP1_3"/>
  </PrimaryServers>
</ServerCluster>

End of the transition:

<ServerCluster LoadBalance="Round Robin" Name="cluster_WL61">
  <!-- Server ServerWL61_X have a weight of 0 -->
  <Server CloneID="a8er1kj2" LoadBalanceWeight="0" Name="ServerWL61_1">
    <Transport Hostname="test1.ibm.com" Port="9081" Protocol="http"/>
  </Server>
  <Server CloneID="a8er2kd3" LoadBalanceWeight="0" Name="ServerWL61_2">
    <Transport Hostname="test2.ibm.com" Port="9082" Protocol="http"/>
  </Server>
  <Server CloneID="a8es3as1" LoadBalanceWeight="0" Name="ServerWL61_3">
    <Transport Hostname="test3.ibm.com" Port="9083" Protocol="http"/>
  <!-- Server ServerWL61F1_X added to the cluster_WL61 in the plugin-cfg file -->
  <Server CloneID="a8sd1kj2" LoadBalanceWeight="2" Name="ServerWL61FP1_1">
    <Transport Hostname="test1.ibm.com" Port="9084" Protocol="http"/>
  </Server>
  <Server CloneID="a8as2kd3" LoadBalanceWeight="2" Name="ServerWL61FP1_2">
    <Transport Hostname="test2.ibm.com" Port="9085" Protocol="http"/>
  </Server>
  </Server>
  <Server CloneID="a8qa3as1" LoadBalanceWeight="2" Name="ServerWL61FP1_3">
    <Transport Hostname="test3.ibm.com" Port="9086" Protocol="http"/>
  </Server>
  <PrimaryServers>
    <Server Name="ServerWL61_1"/>
    <Server Name="ServerWL61_2"/>
    <Server Name="ServerWL61_3"/>
    <Server Name="ServerWL61FP1_1"/>
    <Server Name="ServerWL61FP1_2"/>
    <Server Name="ServerWL61FP1_3"/>
  </PrimaryServers>
</ServerCluster>
[...]
<ServerCluster LoadBalance="Round Robin" Name="cluster_WL61FP1">
  <PrimaryServers>
  </PrimaryServers>
</ServerCluster>


Parent topic: Performing a rolling upgrade to install a fix pack