Installing a Cluster

Note: If you are setting up a cluster for the Location Intelligence Module only, follow the instructions in Installing a Cluster for the Location Intelligence Module.

Installing a cluster involves setting up one Spectrum™ Technology Platform server at a time. Each time you add a server you need to point it to an existing server which will act as a seed node. A seed node is a server that has a copy of the Spectrum configuration data that it can copy to a new node so that the new node's configuration is synchronized with the other nodes in the cluster. The following diagrams illustrate this process.

After installing the first node you will in effect have a cluster with only one node:



When you install the second node it must point to the first node as a seed node. This will enable the second node to receive a copy of the first node's configuration database, resulting in a cluster with two nodes with synchronized configuration information.



As you add additional nodes, the new nodes can point to any of the existing nodes as a seed node. You must also configure the first node to point to at least one other node in the cluster so that if it is ever brought down it can rejoin the cluster.



To install a cluster, follow these steps:

  1. Install a load balancer. You can choose for yourself an appropriate load balancer. Follow the procedures described in the load balancer's documentation when installing.
    Note: The load balancer must be configured to allow encoded forward slashes. If the load balancer does not allow encoded forward slashes you may get HTTP 404 errors while using the cluster. For example, if you are using an Apache load balancer, you can configure it to allow encoded forward slashes by opening the httpd.conf file and specifying this property: AllowEncodedSlashes On. For other types of load balancers, refer to the load balancer's documentation.
  2. Install Spectrum™ Technology Platform on a server where you want to host a node. For instructions, see Installing a New Server.
  3. If the Spectrum™ Technology Platform server is running, stop it. To stop the server, right-click the Spectrum™ Technology Platform icon in the Windows system tray and select Stop Spectrum™.
  4. Edit the file server/app/conf/spectrum-container.properties as follows:
    spectrum.cluster.enabled
    Set this to true.
    spectrum.cluster.name
    Set this to any name you want to give to the cluster. If you have multiple clusters, give each cluster a unique name.
    spectrum.cluster.address
    Set this to the network interface to which you want this node to bind. Specify 0.0.0.0 if you want the node to bind to all network interfaces.
    spectrum.cluster.seeds

    Set this to the IP address of the Spectrum™ Technology Platform server whose configuration will be reproduced on new nodes added to the cluster. The new server will be configured with the same settings as the seed server whenever it starts up so that it is synchronized with the cluster.

    If this is the first node in the cluster you need to specify a seed node that is not yet running. If you know the IP address of the node you want to use as a seed node, enter it now. Otherwise, you will need to return to this properties file once you have the IP address of the seed node. Do not specify 127.0.0.1 as a seed node.

    You can specify multiple IP addresses by separating each with a comma. We recommend that you specify multiple seed nodes so that if one is down others can be used to allow the node to join the cluster. The node will attempt to access each seed node in the order listed. If none of the seed nodes can be reached, the node will not join the cluster.

    spectrum.cluster.nodename
    Optional. This property allows you to define a specific node name to associate with the configuration database on this node. You should set this option if you plan on manually copying the configuration database from one server to another, such as copying the configuration database from a staging server to a production server. If you do not specify this property, an internally-used node name will be automatically generated by the system.
    spectrum.security.authentication.token.remoteClientCheck.enabled
    Set this value to false if nodes in the cluster are behind different network devices, such as different VM adapters. Setting this property to false will prevent "invalid token" errors when using token authentication for web service requests. For more information, see Disabling Host Checks in Token Authentication.
  5. Uncomment these properties:
    spectrum.runtime.hostname=
    spectrum.runtime.port=

    Modify these to point to the load balancer host name and the port on which you have configured the load balancer to listen.

  6. Save and close the spectrum-container.properties file.
  7. Some modules have module-specific settings that you must configure to enable the module to work in a cluster.
    Module Cluster Configuration Settings
    Advanced Matching Module These settings configure clustering for full-text search indexes. If you do not use full-text search indexes you do not need to configure these settings.

    Open this file in a text editor:

    SpectrumFolder\server\modules\searchindex\es-container.properties

    Configure these properties:

    index.provider.default
    Leave this setting set to false.
    es.cluster.start.datanode.onload
    Leave the setting to false if you do not want the cluster to open the search index datanode upon startup.
    es.cluster.enabled
    Leave the setting to true if you want clustering to be enabled for search indexes.
    es.cluster.name
    Enter the name of the cluster that you want the search index node to join. The cluster name is specified in the spectrum-container.properties file in the spectrum.cluster.name property.
    discovery.zen.ping.unicast.hosts
    Enter the IP address of each node in the cluster that you want the search index to join. Separate IP addresses with a comma.
    discovery.zen.minimum_master_nodes
    Enter the minimum number of master nodes. This property determines how many nodes need to be in communication in order to elect a master; therefore, this number should represent a quorum, or a majority, of your master-eligible nodes.
    es.index.default_number_of_replicas
    Enter the number of additional copies you want created for each search index. This number should be the number of nodes in your cluster minus 1. For example, if your cluster has five nodes, you would enter "4" in this property.
    es.index.default_number_of_shards
    Enter the number of shards you want your index to have in the distributed environment. The more nodes that are in your cluster, the higher this number should be.
    es.index.enable._source
    Leave the setting to true if you want to enable partial updates. If es.index.enable._all is set to true, this property must be set to false.
    es.index.enable._all
    Change this setting to true if you want to enable full updates. If es.index.enable._source is set to true, this line must be set to false.
    es.cluster.node.name
    Enter a name for this node.
    es.cluster.node.IP
    Enter the IP address of this node.
    es.cluster.node.data.directory
    Enter the path where you want to store search index data on this node. You can specify different paths on each node, or the same path on all nodes.

    Save and close es-container.properties when you are done editing these properties.

    Note: Search indexes created prior Spectrum™ Technology Platform 10.0 do not support clustering. To enable clustering for indexes created prior to the 10.0 release, you must recreate the search index using the 10.0 API after modifying the es-container.properties file.
    Data Hub Module Open this file in a text editor:

    SpectrumFolder\server\modules\hub\hub.properties

    Configure these properties:

    hub.models.path.base
    Specifies the folder where models are stored. By default, each model is placed in a subdirectory under the SpectrumFolder\server\modules\hub\db folder. If you want to store models in a different location, uncomment this property and specify the folder where you want to store models.
    hub.neo4j.database.type
    Change the value of this property to ha. The default value embedded is for non-clustered installations.
    hub.servers.per.cluster
    Uncomment this line. Set the value of this property to the number of Spectrum™ Technology Platform servers in the cluster.

    Save and close hub.properties when you are done editing these properties.

    The SpectrumFolder\server\modules\hub\db\neo4j.properties controls how the graph databases are configured, using Neo4j Enterprise. This file is used as a template for each model. If needed, each model can be configured separately by placing a copy of this property file into the store directory for that model.

  8. Start the server. To start the server, right-click the Spectrum™ Technology Platform icon in the Windows task bar and select Start Server.

Add additional nodes to the cluster. For instructions on adding a node, see Adding a Node to a Cluster.