Configuring Managers for Manager or Container High Availability

Describes the steps you must complete for all individual Sybase CEP Servers acting as Managers in your cluster when configuring Manager or Container High Availability.

Complete these steps individually for all Sybase CEP Servers acting as Managers in your cluster, whether or not you plan to run multiple Managers. Some of these values have already been set appropriately by the installation program, but other preferences will need to be set manually. Refer to the information from "Preparing to Configure High Availability Features" while you work on this section.

  1. If you plan to configure Sybase CEP Engine High Availability features for Manager failover, set the "SybaseC8/Server/Common/ManagerURI" preference in the c8-server.conf configuration file to the Manager's Uniform Resource Identifier (URI). To use only one Manager with no Manager failover, set this preference to the local address of the Manager.

    The Manager URI uses the following format: http:// generic-host-name-alias:port or https:// generic-host-name-alias:port where generic-host-name-alias is the generic host name alias you set up in Step 7d of "Preparing to Configure High Availability Features", and port is the port number set for the Managers in your cluster in Step 3c of "Preparing to Configure High Availability Features". If SSL is enabled on Sybase CEP Servers in the cluster, then all Manager URIs must start with https:// instead of http:// . For more information about configuring SSL features, see "Configuring SSL Support".

    If you are using multiple Managers in your cluster, and the "ManagerURI" preference is currently set to the local address of the computer where the Manager is installed, replace the local address with the URI. For example, you might change this preference:

    <section name="SybaseC8/Server">
    	<section name="Common">
       ...
       <!-- the URI of the Manager this server is using -->
       <preference name="ManagerUri">
         http://localhost:6789</preference>
    

    to this:

    <section name="SybaseC8/Server">
    	<section name="Common">
       ...
       <!-- the URI of the Manager this server is using -->
       <preference name="ManagerUri">
         http://C8MgrShared:6790</preference>
    

    As explained in "Configuring Managers for Manager or Container High Availability", the Domain Name Service (DNS) uses this URI to route messages from Containers to the current active Manager. All the Managers in your cluster must refer to the same Manager URI.

  2. Specify how many active Containers you want the Manager to try to maintain at any given time in the "Manager/HighAvailability/MinActiveContainerNative" preference of the c8-server.conf configuration file. For example:

    <section name="Manager">
    	...
    	<section name="HighAvailability">
       <!-- After this number of active native containers is
            reached, all containers will be made passive -->
       <preference name="MinActiveContainersNative" value="0"/>
    

    The default setting for this value is 0, which specifies unlimited active Containers. If you set the value to 0, the Manager activates all available Containers. If you set the value to another number, the Manager attempts to limit the number of Containers to the number you specify in "MinActiveContainersNative".

    Under normal circumstances, the Manger sets all other available Containers to passive mode until they are needed for failover. However, the "LoadLimit" setting, which specifies the maximum number of CCX modules (that is, adapters or query processors) that a given Container can simultaneously execute, may affect the number of active Containers. If a Container's "LoadLimit" setting does not permit it to take on additional workload, the Manager attempts to activate another available passive Container, even if the number of active Containers specified in the "MinActiveContainersNative" has already been reached.

Complete these steps for every Sybase CEP Server acting as Manager in your cluster only if you are using multiple Managers and setting up Manager failover features. If you plan to use a single Manager with no failover features, skip the rest of this section and go to "Configuring Containers for High Availability" for instructions on configuring Containers for High Availability features.

  1. Set the "SybaseC8/Server/Common/StoragePath" preference in the c8-server.conf configuration file to the full path and name of the storage directory created in Step 5b of "Preparing to Configure High Availability Features".

    For example:

    <section name="SybaseC8/Server">                                <section name ="Common">
       ...
       <!-- the path on disk, under which the server
            components (directory, workspace mgr,
            qp state, etc) should persist -->
       <preference name="StoragePath"
         value="C:\public\shared\home\C8MgrShared"/>
    

    This preference must be set to the same directory for all Managers in a cluster to enable the Managers to communicate with one another.

  2. If the "Enabled" preference in the "SybaseC8/Server/Manager/HighAvailability/ManagerCluster" section of the c8-server.conf file is enclosed in comment marks, remove the comment marks.
  3. Set the "Enabled" preference to true:
    <section name="Manager">
       ...
       <section name="HighAvailability">
         ...
         <section name="ManagerCluster">
           <!-- The flag that enables/disables high
             availability configuration for manager 
             server (multiple manager nodes) -->
           <preference name="Enabled" value="true"/>
    
  4. If the "NodeURI" preference, in the "SybaseC8/Server/Manager/HighAvailability/ManagerCluster" section of the c8-server.conf file is enclosed in comments marks, remove the marks.
  5. Set the "NodeURI" preference to an IP address that uniquely identifies the particular Sybase CEP Server in your cluster.

    This address can be used to identify the current cluster node, regardless of whether it is currently serving as the primary Manager. For example:

    <section name="Manager">
       ...
       <section name="HighAvailability">
         ...
         <section name="ManagerCluster">
           ...
           <preference 
              name="NodeUri"value="206.45.31.158"/>
    

    While all Managers in a cluster must have the same "ManagerURI" setting, every Manager within the cluster must have its own unique "NodeURI", which must be specified in both the c8-server.conf file and in the c8-manager-cluster.xml file.

  6. Set up the cluster configuration file. All Managers in a cluster must refer to this file, which, together with the storage path setting, enables communication among Managers. The conf subdirectory of the server directory in every Sybase CEP Server installation directory contains a sample cluster configuration file, called c8-manager-cluster.xml. However, all the Managers in your cluster must be able to access the same cluster configuration file in a common location.
    1. Place a copy of the c8-manager-cluster.xml file in the shared conf directory created in Step 5b of "Preparing to Configure High Availability Features".
    2. Change the path and file name setting of the "ConfigurationPath" preference of every Manager in the cluster to the set the configuration path to the full path and file name of the c8-manager-cluster.xml file.

      For example:

      <section name="Manager">
         ...
         <section name="HighAvailability">
           ...
           <section name="ManagerCluster">
             ...
             <preference name="ConfigurationPath" value=
               "C:\public\shared\home\C8MgrSharedc8-manager-cluster.xml"/>
       
      

      This preference is located in the "SybaseC8/Server/Manager/HighAvailability/ManagerCluster" section of the Manager's c8-server.conf file. If the preference is enclosed in comment marks, remove the marks when setting the storage path.

    3. Configure the cluster configuration file to include information about all the available Managers in your cluster.

      See the comments in the c8-manager-cluster.xml file itself for instructions.

  7. In the c8-server.conf file, specify information for the plugin that notifies the DNS when a new Manager becomes the active Manager.

    A plugin is an SO (Shared Object) file on a UNIX-like operating systems, or a DLL (Dynamic Link Library) on Microsoft Windows.

    If an active Manager fails, the remaining (passive) Managers hold an election and elect a new Manager as the primary. The plugin you specify here is then called by the new primary Manager. This plugin executes a program, such as nsupdate, and passes the necessary parameters to the program. The program in turn notifies the DNS of the new Manager's IP address and related information. Each Manager in your Sybase CEP Server cluster requires its own command file because the Managers all have unique IP addresses.

    1. Remove the comments around the "ManagerFailoverDDNSPPlugin" section of the c8-server.conf file.
    2. Set the "MessageGroup" preference in the "ManagerFailoverDDNSPlugin" section to "ManagerInfo":
      <!-- Sample command-line plugin configuration -->
      		<!--
      		<section name="ManagerFailoverDDNSPlugin">
         ...
          <preference name="MessageGroup" value="ManagerInfo"/>
      
    3. Set the "MessageName" preference in the "ManagerFailoverDDNSPlugin" section to "ManagerHAPromotedToPrimary".

      This event occurs on every Manager in the cluster when a backup Manager node is promoted to be the new primary (active) Manager:

      <!-- Sample command-line plugin configuration -->
      		<!--
      		<section name="ManagerFailoverDDNSPlugin">
         ...
          <preference name="MessageName"
         value="ManagerHAPromotedToPrimary"/>
      
    4. Set the "CommandName" preference to the program you want the plugin to execute.

      For example:

      <!-- Sample command-line plugin configuration -->
      		<!--
      		<section name="ManagerFailoverDDNSPlugin">
          ...
          <preference name="CommandName" value="/usr/bin/nsupdate"/>
      
    5. Set the "CommandArgument#" preference values, where # is a number from 1 to 1024. These settings specify the parameters that the plugin should pass to the program specified in "CommandName". The first argument must always be specified under "CommandArgument1". List additional arguments in order, under "CommandArgument2", "CommandArgument3" and so on.

      The parameters specified under command arguments depend on the program being used. In many cases one of these parameters is the name of a text file that includes appropriate commands for updating the hostname-to-IP address mapping on the DNS. By default, the "ManagerFailoverDDNSPlugin" section of the c8-server.conf file includes an example text file path under "CommandArgument4", although you are not required to use this preference for hostname-to-IP address mapping.

      Note also that the text file is not generic to all Managers. Since the exact instructions are different for every Manager (because every Manager uses a different IP address), every Manager must reference its own command file.Here is an example of command argument settings:

      <!-- Sample command-line plugin configuration -->
      <!--
      <section name="ManagerFailoverDDNSPlugin">
         ...
         <preference name="CommandArgument3" value="-v"/>      
         <preference name="CommandArgument4" value="C:\public    \shared\home\C8MgrShared\conf\nsupdate_datafile1.txt"/>
      

      In this example, the plugin passes two parameters to the program. The first of these is the -v preference, which instructs nsupdate to read a file. The second preference is the name of a text file that contains commands to change the DNS map. For example, if alpha's IP address is 10.10.10.97, its full name is alpha.myzone.myco.com, the TTL is ten (10) seconds, and the DNS server name is DNSServ1, and the nsupdate commands in the nsupdate_datafile.txt for alpha may look as follows:

      server DNSServ1 
      zone myzone.myco.com
      update delete alpha.myzone.myco.com A
      update add alpha.myzone.myco.com 10 A 10.10.10.97
      show
      send
      

      Note that DNS caches names and reuses the names stored in the resolver cache. Make sure that the TTL ("Time to Live") setting of your DNS record is set to a short time period (10 or 20 seconds) to prevent old Manager names from being cached and reused. Refer to your DNS documentation for more information about setting the TTL

      Some DDNS commands require an authentication key, which may be stored in a file. If your system is configured to require an authentication key, provide the full path and name of the key file in one of the "CommandArgument#" preferences in the c8-server.conf file. By default, the "ManagerFailoverDDNSPlugin" section of the c8-server.conf file includes a sample text file path entry will be entered as a setting for the "CommandArgument2" preference.