Configuring Clusters

Configure clusters to enhance performance by dividing processing work among a number of servers.

If you did not configure your cluster during installation, or to create and configure a new cluster, follow these steps.

In a clustering configuration, you must configure all components of a node. Each node in a cluster has four basic sections of configuration, the controller, manager, RPC, and cache:
[...]
- <Controller enabled="true">
  </Controller>
  <Manager enabled="true" /> 
- <Rpc>
  <Port>19011</Port> 
  </Rpc>
- <Cache>
		<Host>thehostname</Host>
  <Port>19001</Port> 
  <Name>test-name-1</Name> 
  <Password>test-password-1</Password> 
		<Managers enabled="true">
			<Manager>localhost:19001</Manager>
			<Manager>localhost:19002</Manager>
 		<Manager>localhost:19003</Manager>
		</Managers>
		<Persistence enabled="true"
			<Directory>${ESP_STORAGE}</Directory>
		</Persistence>
  </Cache>
[...]
  </Node>
Configuration varies based on whether you enable the node as either a controller or manager, or both.
Note: The sample file used for this task is on a UNIX-based installation of Event Stream Processor.

When configuring a cluster, the value for Host Name uses the default "localhost". To allow cluster clients from other machines to connect, the host name must be changed to that of the machine on which the cluster node is running.

  1. Open the the configuration file from ${ESP_HOME}/cluster/nodes/<node-name>/<node-name>.xml on UNIX installations, or from %{ESP_HOME}%\cluster\nodes\<node-name>\<node-name>.xml on Window installations.
  2. Provide a unique name for the node within the cluster.
    <Name>node1</Name>
    Note: Node names are case-insensitive.
  3. (Optional) Configure macro name and type elements.
    A macro is a configuration file shortcut for centralizing a repeated configuration or for acquiring properties from the environment.
    Permitted macro type entries are:
    • envar – value is derived from environment variable defined by macro value.
    • sysproperty – value is derived from the Java system property defined by the macro value.
    • value – the value specified is used.
    • prompt – when the cluster starts, the user is prompted for the value.
    <Macros>
    <Macro name="ESP_HOME" type="envar">ESP_HOME</Macro>
    </Macros>
  4. (Optional) Configure system properties.
    This step can include the replacement of macro values with literal values through macro expansion.
  5. Enable the controller:
    <Controller enabled="true">
  6. For controller-enabled nodes, configure the pre-existing applications within the controller section. For each application, provide a name, enable the application by setting it to true, and define the application class.
    The following example shows a project application, with definitions for the base directory, host name, service configuration file, and security directory that the application uses. These directories may be modified, but must be consistent across all projects within a cluster.
    - <ApplicationTypes>
    - <ApplicationType name="project" enabled="true">
      <Class>com.sybase.esp.cluster.plugins.apptypes.Project</Class> 
      <StandardStreamLog enabled="true" /> 
    - <Properties>
      <Property name="esp-home">${ESP_HOME}</Property> 
      <Property name="hostname">${ESP_HOSTNAME}</Property> 
      <Property name="ld-preload" /> 
      <Property name="services-file">${ESP_HOME}/bin/service.xml</Property> 
      <Property name="base-directory">${ESP_HOME}/cluster/projects/test-name-1</Property> 
      <Property name="ssl-key-file">${ESP_HOME}/security</Property> 
      </Properties>
      </ApplicationType>
    
    The ld-preload parameter must be modified if you are using an alternative Java Runtime Environment (JRE) than the one provided with Event Stream Processor. If you are using an alternative JRE, point to the jsig library file provided with your runtime environment.
  7. Enable the manager:
    <Manager enabled="true" />
  8. (Optional) Define the host node for the RPC port:
    Use this property to specify which network interface you want a cluster to use, particularly in environments that use multiple network cards.
    <Host>thehostname</Host>
  9. Provide the RPC port value.
    (Optional) Set the Port SSL value to true to enable SSL for the cluster.
    <Port ssl="true">19011</Port>
  10. For manager-enabled nodes, provide the cache port value.
    <Port>19011</Port>
  11. (Optional) Define the host node for the cache.
    Use this property to specify which network interface you want a cluster to use, particularly in environments that use multiple network cards.
    <Host>thehostname</Host>
  12. Define a unique name and password for the cache. All nodes added to this cluster must use the same name and password to interact with the cache.
      <Name>test-name-1</Name> 
      <Password>test-password-1</Password> 
  13. (Optional) To enable multicast delivery on manager-enabled nodes, set the enabled value to true and enter Group and Port values.
    <Multicast enabled="true">
                <Group>224.2.2.7</Group>
                <Port>54323</Port>
            </Multicast>
    If multicast is not enabled, the manager node must be enabled and defined.
    <Multicast enabled="false">
     [...] 
    </Multicast>
    <Managers enabled="true">
      <Manager>localhost:19001</Manager> 
    </Managers>
    
    All nodes must have the same multicast status.
  14. Enable or disable persistence.
    By default, this value is set to false. If you are enabling persistence, you can modify the directory where persistence information is stored. All nodes within a single cluster should point to the same persistence directory.
    <Persistence enabled="true">
    	<Directory>${ESP_STORAGE}</Directory>
    </Persistence>
  15. Define security values.
    Security values, including File, Policy and Keystore must be consistent with existing security settings.
    <Security>
            <Csi>
                <File>${ESP_HOME}/security/csi_ldap.xml</File>
                <!--Policy>${ESP_HOME}/security/policy.xml</Policy-->
            </Csi>
            <Keystore>
                <Type>JKS</Type>
                <File>${ESP_HOME}/security/keystore.jks</File>
                <Password>pass123</Password>
                <KeyPassword>pass123</KeyPassword>
                <Algorithm>RSA</Algorithm>
            </Keystore>
        </Security>
    Note: The <Policy> parameter applies only to LDAP authentication.
Related tasks
Starting a Cluster