19.5.7. Migrate Traffic between Clusters

Summary

After creating a new cluster using JBoss EAP 6, you may want to migrate traffic from a previous cluster to the new one as part of an upgrade process. In this task, you will see the strategy that can be used to migrate this traffic with minimal outage or downtime.

Prerequisites

Procedure 19.10. Upgrade Process for Clusters

  1. Setup your new cluster using the steps described in the prerequisites.
  2. In both Cluster NEW and Cluster OLD, make sure that the configuration option sticky-session is set to true (this is true by default). Enabling this option means that all new requests made to a cluster node in either cluster will continue to go to that node.
    /profile=full-ha/subsystem=modcluster/mod-cluster-config=configuration/:write-attribute(name=sticky-session,value=true)
    
  3. Add the nodes in Cluster NEW to the mod_cluster configuration individually using the process described here: Section 19.5.6, “Configure a mod_cluster Worker Node”
  4. Configure the load balancer (mod_cluster) to stop the individual contexts in Cluster OLD. Stopping contexts (as opposed to disabling them) in Cluster OLD will allow the individual contexts to shutdown gracefully (and eventually shutdown the whole node). Existing sessions will still be served, but no new sessions will be directed to those nodes. The stopped contexts may take several minutes to several hours to stop.
    You can use the following CLI command to stop a context. Replace the parameter values with values that are relevant in your environment.
    [standalone@localhost:9999 subsystem=modcluster] :stop-context(context=/myapp, virtualhost=default-host, waittime=50)
Result

You have successfully upgraded a JBoss EAP 6 Cluster.