A session ownership store implementation that interacts with a Cassandra persistence resource is included within a Rhino installation.

An example configuration for this session ownership store, with the default values for each configurable parameter, is shown below:

  <session-ownership-store service-provider-class-name="com.opencloud.resource.sessionownership.cassandra.CassandraSessionOwnershipStoreServiceProvider" default-ttl="3600">
    <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="schemaVersion" type="java.lang.String" value="1.0"/>
    <parameter name="tombstoneGCGracePeriod" type="int" value="3600"/>
    <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"/>
  </session-ownership-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 that the session ownership facility be enabled.

Documentation for the session ownership 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/session-ownership-store subdirectory.

Setting the tombstone deletion strategy to a shorter interval than the default is strongly recommended for session ownership 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.

Rhino 2.6.1 creates session ownership tables in the keyspace rhino_session_ownership_<cluster_id>_default. If installing a new cluster the gc_grace_period configuration can be set by adding <parameter name="tombstoneGCGracePeriod" type="int" value="3600"/> to the <session-ownership-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

USE rhino_session_ownership_100_default;
ALTER ADDITIONAL_KEYS WITH gc_grace_seconds = 3600;
ALTER SESSIONS WITH gc_grace_seconds = 3600;

The CQL command DESCRIBE KEYSPACES; lists the keyspaces in the Cassandra database. DESCRIBE TABLES <keyspace_name>; lists tables in the chosen keyspace.

Previous page Next page
Rhino Version 2.6.1