Previous Topic: pdm_userload—Load Tenant DataNext Topic: Customizing


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.

CA SDM automatic failover feature exposes the following HTTP based standard interfaces:

Follow these steps:

  1. Install Apache Tomcat on the background and all standby servers.

    Note: Ensure that Tomcat is using JRE 1.7 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 the How to Configure SSL Authentication scenario or the Administration Guide.
  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.

      Important! If you are creating a new process, the existing process is commented out in the pdm_startup file and new entries are created. Ensure that you look for the tagname in the new process entries.

      Important! If you customize 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:

    Important! We recommended you to configure the failover servlet on SSL with the access privileges given only to predefined users. This is also applicable while configuring third-party tool 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.
  10. If the HTTP 503 response is received, the third-party tool automatically initiates the failover logic.