How to Enable Auto-Failover

Server health monitoring observes how a server reacts to the operating load and tracks its responsiveness to the client requests. The purpose of this monitoring is to prevent server failures by ensuring that the server always retains sufficient capacity to conduct the required tasks. Most of the standard health monitoring tools support remote server monitoring through the HTTP and HTTPS protocols.
casm172
Server health monitoring observes how a server reacts to the operating load and tracks its responsiveness to the client requests. The purpose of this monitoring is to prevent server failures by ensuring that the server always retains sufficient capacity to conduct the required tasks. Most of the standard health monitoring tools support remote server monitoring through the HTTP and HTTPS protocols.
CA SDM automatic failover feature exposes the following HTTP-based standard interfaces:
  • Health Monitoring Interface: HTTP(S) interface to monitor the background server health. It also makes reliable failover decisions to initiate the failover on a chosen standby server in case of any disruptions to the background server’s availability or ability to conduct required tasks.
  • Failover Initiating Interface: HTTP(S) interface to promote the chosen standby server as the new background server without causing any service disruption.
Follow these steps:
  1. Install Apache Tomcat 8.5.6 on the background and all standby servers.
    Ensure that Tomcat is using JRE 1.8 and ensure that the Tomcat is not using the port number that is configured for the CA SDM components.
  2. (Optional) Configure SSL on the Tomcat servers that you have installed. For more information about configuring SSL, see How to Configure SSL Authentication.
  3. Log in to the background server.
  4. Deploy the health servlet. Complete the following steps:
    1. Copy the HealthServlet.war file from the $NX_ROOT/samples/HealthServlet folder to the
      TOMCAT_HOME
      /webapps folder.
    2. Restart Tomcat.
    The HealthServlet.war file is deployed in the webapps folder. To confirm the deployment, verify that the HealthServlet folder is created in the same webapps folder.
    After the successful deployment, the health servlet is ready to perform the health checks. It includes checking the status of the SLUMP and health of the CA SDM processes that are defined in the health.xml file. Find the health.xml file in the following location:
    TOMCAT_HOME/webapps/HealthServlet/WEB-INF/classes
  5. (Optional) Customize the health.xml based on your organization needs. For example, you want to monitor the webengine process. Add the process in the health.xml file with the correct tagname, as defined in CA SDM. Complete the following steps to find the tagname:
    1. Open the pdm_startup.i and pdm_startup files from the $NX_ROOT/pdmconf directory.
    2. Look for the process that you want to monitor in both the files.
    3. Find the corresponding tagname by matching the variables in both the files.
      For example, webengine process is defined in the pdm_startup.i file as follows:
      #define WEBENGINE(_TAG,_HOST,_SLUMP_NAME,_DOMSRVR, _CFG, _WEBDIRECTOR, _RPC_NAME)
      The webengine process is defined in the pdm_startup file as follows:
      WEBENGINE(webengine, $NX_LOCAL_HOST, web:local, domsrvr, $NX_ROOT/bopcfg/www/web.cfg, "", "rpc_srvr:%h")
      From the example, we can find out that the tagname for webengine process is webengine.
      For creating a new process, the existing process is commented out in the pdm_startup file and new entries are added. Ensure that you look for the tagname in the new process entries.
      If you modify health.xml, ensure that the XML does not have any errors and that you restart Tomcat to reflect the changes that are made to the XML.
  6. Perform steps 4 and 5 for all standby servers.
  7. Configure the chosen third-party tool to monitor the health of the background server at regular intervals. To monitor the health, use the following HTTP URL:
    http(s)://Background_server_name:port_number/HealthServlet/GetHealth
  8. Configure the chosen third-party tool to initiate a failover logic when the background server health degrades. We recommend that you to configure the failover logic so as to promote the standby server as the new background server. Use the following failover servlet in the failover logic:
    We recommended you to configure the failover servlet on SSL with the access privileges given only to predefined users. Follow this recommendation for configuring third-party tools to initiate failover.
    http(s)://Standby_server_name:port_number/HealthServlet/FailoverServlet
    You have enabled auto-failover.
  9. After the successful configuration, the third-party tool starts monitoring the background server health using the health servlet URL.
    • Each server type has its own set of processes. If the SLUMP and all the CA SDM processes are working properly, the third-party tool receives an HTTP 200 response from the background server with a predefined payload:
      AA-Server-Status: All OK! AA-Server-Role: BG
    • If a SLUMP or any of the CA SDM processes (listed in health.xml) stop working and cannot resume, the third-party tool receives an HTTP 503 response from the background server with a predefined payload as:
      AA-Server-Status: NOT OK! AA-Server-Role: BG
  10. If the HTTP 503 response is received, the third-party tool automatically initiates the failover logic.