Jump to: navigation, search

Configuring Cassandra

Genesys Web Engagement version 8.1.2 includes an embedded Cassandra database (version 1.2.15). To enable Cassandra to function optimally, you must configure the embedded data storage on your Backend Server environment by completing the procedures on this page.

Configuring the Java Heap Size

Start

  1. Navigate to your installation directory for the Backend Server and open the setenv.bat file with a text editor.
  2. Find the "Java Virtual machine settings" section.
  3. Modify the -Xmx and -Xms parameters according to your hardware configuration. Genesys recommends that you specify a Java Heap size of 1/4 of your system memory, but not greater than 8 GB. For example, your configuration could look like the following:
    set JAVA_OPTS=%JAVA_OPTS% '''-Xms4096m -Xmx4096m''' -XX:MaxPermSize=250m -XX:+HeapDumpOnOutOfMemoryError

    Consult the Cassandra documentation at http://www.datastax.com/documentation/cassandra/1.2/cassandra/operations/ops_tune_jvm_c.html for more information about Cassandra clusters and memory.

  4. Save your changes.

End

Configuring the Embedded Cassandra Server Properties

Prerequisites

Start

  1. Navigate to the Web Engagement installation directory and edit the \apps\application name\environment\environment.local.properties file. The values specified in this file are inserted into the cassandra.yaml and wmbackend.properties files during the application build step. All configuration parameters for Cassandra in environment.local.properties start with wmdb.cassandra.cluster. The parameters and their default values:
    # WMDB-Cassandra
    # Tokens in cassandra.yaml and wmbackend.properties files will be substituted by these parameter values.  
    wmdb.cassandra.cluster.name=Cluster
    wmdb.cassandra.cluster.keyspaceName=WebMonitoring
    wmdb.cassandra.cluster.defaultStrategyParams=
    wmdb.cassandra.cluster.defaultStrategy=SimpleStrategy
    wmdb.cassandra.cluster.defaultReplicationFactor=3
    wmdb.cassandra.cluster.listenAddress=localhost
    wmdb.cassandra.cluster.rpcAddress=localhost
    wmdb.cassandra.cluster.rpcPort=19160
    wmdb.cassandra.cluster.sslStoragePort=17001
    wmdb.cassandra.cluster.storagePort=17000
    wmdb.cassandra.cluster.seedNodes=127.0.0.1
    wmdb.cassandra.cluster.dataDirectory=DATA_DIR_PLACEHOLDER
    wmdb.cassandra.cluster.commitLogDirectory=COMMITLOG_DIR_PLACEHOLDER 
    wmdb.cassandra.cluster.savedCachesDirectory=SAVED_CACHES_DIR_PLACEHOLDER

    For information about all the Cassandra configuration properties, refer to the Cassandra documentation: http://www.datastax.com/documentation/cassandra/1.2/cassandra/configuration/configCassandra_yaml_r.html
    Note: Making changes in the environment.local.properties file keeps the client and server connection parameters synchronized.

  2. Update the Cassandra configuration parameters with values appropriate for your deployment. You will need to modify the following parameters:
    • wmdb.cassandra.cluster.defaultStrategy—The default value is SimpleStrategy, but if you plan to deploy the cluster across multiple data centers, consider using org.apache.cassandra.locator.NetworkTopologyStrategy.
      • SimpleStrategy
        • wmdb.cassandra.cluster.defaultReplicationFactor—The keyspace replication factor, for use with SimpleStrategy only. When choosing a replication factor value, take into account that by default Genesys Web Engagement instructs Cassandra to use the QUORUM consistency level for both writes and reads. Genesys recommends that you set the replication factor to a value of not less than 3. You can get a sense of the data consistency and cluster high availability of a configuration by using the Cassandra calculator that is available at http://www.ecyrd.com/cassandracalculator/.
      • org.apache.cassandra.locator.NetworkTopologyStrategy
        • wmdb.cassandra.cluster.defaultStrategyParams—Cross–data center replication strategy parameters for NetworkTopologyStrategy. For example, DataCenter1:3,DataCenter2:2 indicates a replication factor of 3 for DataCenter1 and 2 for DataCenter2.
        • The endpoint_snitch parameter in cassandra.yaml must be set to GossipingPropertyFileSnitch.
        • A cassandra-rackdc.properties file with the name of the selected data center MUST be placed in the <webengagement_root>/servers/backend/resources folder for every Backend Server.

          Details for cassandra-rackdc.properties are available at http://docs.datastax.com/en/cassandra/2.0/cassandra/architecture/architectureSnitchGossipPF_c.html.

          Important
          If you are using a multi–data center configuration, the consistency level applies to every data center. You must select the appropriate consistency level for your specific configuration.

          In particular, please note that the QUORUM consistency levels have limitations when applied to a multi–data center configuration. Note also that NetworkTopologyStrategy is not compatible with some QUORUM consistency levels when they are applied to a single node in a selected data center. For example:
          DC1:1, DC2:1 does not work with LOCAL_QUORUM, QUORUM and EACH_QUORUM consistency levels
          DC1:2, DC2:1 works with LOCAL_QUORUM for DC1 clients, but not with QUORUM and EACH_QUORUM
          DC1:1, DC2:2 works with LOCAL_QUORUM for DC2 clients, but not with QUORUM and EACH_QUORUM

          DC1:2, DC2:2 works with all QUORUM consistency levels.
      • wmdb.cassandra.cluster.seedNodes—Choose your seed nodes, keeping in mind that if you plan to deploy the Cassandra cluster across multiple data centers, you should have at least one seed node from each data center. Set the value of wmdb.cassandra.cluster.seedNodes to a comma-separated list of the IPs for your seed nodes. For example, 135.225.54.236, 135.225.54.245.
      • listen_address and rpc_address—These parameters are likely to be different for each Backend Server / Cassandra node in the cluster and must be set directly in the \servers\backend\etc\cassandra.yaml file for each Backend Server. See Configuring Cassandra for the Cluster for details on setting these parameters.
  3. Save your changes.

End

Next Steps

This page was last modified on July 19, 2016, at 15:17.

Feedback

Comment on this article:

blog comments powered by Disqus