A key/value store implementation that interacts with a Cassandra persistence resource is included within a Rhino installation.

An example configuration fragment for this key/value store, with the default values for each configurable parameter, is shown below:

  <key-value-store name="cassandra" service-provider-class-name="com.opencloud.resource.kvstore.cassandra.CassandraKeyValueStoreServiceProvider">
    <parameter name="keyspaceReplication" type="java.lang.String" value="{'class': 'SimpleStrategy', 'replication_factor': 1}"/>
    <parameter name="durableWrites" type="boolean" value="true"/>
    <parameter name="sessionReconnectionPeriod" type="long" value="5000"/>
    <parameter name="dataVersion" type="java.lang.String" value="1"/>
    <parameter name="ttl" type="int" value="86400"/>
    <parameter name="tombstoneGCGracePeriod" type="int" value="3600"/>
    <parameter name="writeThreadCount" type="int" value="5"/>
    <parameter name="writeDelay" type="long" value="900"/>
    <parameter name="maxTransactionAge" type="long" value="1500"/>
    <parameter name="minTransactionAge" type="long" value="250"/>
    <parameter name="scanReschedulingDelay" type="long" value="100"/>
    <parameter name="insertDebugLoggingTruncationLength" type="int" value="100"/>
    <parameter name="maxBatchStatementSize" type="int" value="4096"/>
    <parameter name="readTimeout" type="long" value="2000"/>
    <parameter name="writeTimeout" type="long" value="2000"/>
    <persistence-resource-ref name="cassandra"/>
  </key-value-store>

This configuration is provided in the Rhino installation’s default rhino-config.xml file but is disabled by default. It can be automatically enabled during Rhino installation by requesting the KeyValueDatabase be used as the replicated storage resource.

Documentation for the key/value store’s service provider class, which includes a full description of all the configurable parameters, is included in the Rhino installation within the doc/api/key-value-store subdirectory.

Setting the tombstone deletion strategy to a shorter interval than the default is strongly recommended for tables containing high turnover data such as third-party registration tables. The default interval causes increased load on the Cassandra servers during compaction, and particularly during recovery after failover. In applications such as VoLTE, 1 hour is sufficient for proper management of registration and session data. Set the gc_grace_seconds configuration parameter to 3600 to delete tombstone records after 1 hour. Other compaction configuration parameters may assist in the timely deletion of tombstone records but are usually not required.

If installing a new cluster the default gc_grace_seconds configuration can be set by adding <parameter name="tombstoneGCGracePeriod" type="int" value="3600"/> to the <key-value-store> section of `rhino-config.xml, as shown in the example above.

For existing installs each table in this keyspace should be altered to set the gc_grace_seconds. For example, for a Rhino cluster with a cluster ID of 100, run the CQL commands

The CQL command DESCRIBE KEYSPACES; lists the keyspaces in the Cassandra database. DESCRIBE TABLES <keyspace_name>; lists tables in the chosen keyspace. ALTER <keyspace_name>.<table_name> WITH gc_grace_seconds = 3600; sets the gc_grace_seconds property for a table.

Previous page Next page
Rhino Version 2.6.1