11 Configuring Coherence

This chapter describes the implementation and configuration of Oracle Coherence in Oracle WebRTC Session Controller.

WebRTC Session Controller uses Coherence for the following purposes:

  • Cluster-wide engine communication and state management

  • Application call-state storage and management for concurrent SIP calls

About Coherence Engine Communication and State Management

The Domain Creation Wizard automatically creates a default Coherence cluster for managing WebRTC Session Controller information when it sets up new domains. The default cluster includes the engine servers and the administrative server in your environment.

Configuring Coherence for Engine Communication and State Management

You configure the WebRTC Session Controller Coherence implementation using the Oracle WebLogic Administration Console. See the chapter on "Configuring and Managing Coherence Clusters" in Administering Clusters for Oracle WebLogic Server for more information on the parameters that can be set in the Administration Console.

To configure the default Coherence cluster installed with WebRTC Session Controller:

  1. Log in to the Administration Console for the WebRTC Session Controller Administration Server.

  2. In the Domain Structure tree, expand Environment.

  3. Select Coherence Clusters.

  4. In the Coherence Clusters table, select Coherence-Default.

  5. Configure the parameters for the Coherence cluster as needed.

  6. Click Save.

Each engine server and the Administration server acts as a managed Coherence server. See "Configuring Managed Coherence Servers" in Administering Clusters for Oracle WebLogic Server for more information about managed Coherence servers.

To configure Coherence settings for individual engine servers and the Administration Server:

  1. Log in to the Administration Console for the WebRTC Session Controller Administration Server.

  2. In the Domain Structure tree, expand Environment.

  3. Select Servers.

    The Administration Console displays a list of servers included in your WebRTC Session Controller installation.

  4. From the Servers table, select the engine server or the Administration Server for which you want to configure Coherence settings.

  5. In the Configuration tab, select Coherence.

  6. Configure the Coherence parameters for the server.

  7. Click Save.

About Call-State Storage and Management for SIP Calls

The Coherence call-state storage facility for WebRTC Session Controller is built on the distributed cache service of WebLogic Server 12.1.3. In each managed server in the domain cluster, Coherence combines logic and processing with state-storage data. Coherence writes data to the primary partition cache-storage server and it, in turn, writes a backup copy to the configured number of backup copies.

See "Understanding Distributed Caches" in Developing Applications with Oracle Coherence for an explanation of Coherence distributed caches.

Figure 11-1 illustrates an administration server with a Coherence cluster for call-state storage:

Figure 11-1 Coherence Cluster for Call-State Storage

Surrounding text describes Figure 11-1 .

The Coherence call-state storage facility includes the following features:

  • Built-in support for dynamically adding or removing nodes

  • Partitions that migrate dynamically, eliminating the need to configure replica servers and their partitions

  • Enhanced data serialization with Portable Object Format (PoF)

  • Proven node death detection for fail-over and split brain handling

  • Flexible configuration

  • Advanced network protocol that leverages UDP and supports multi-cast to optimize network usage

  • Graceful migration of partitions from one node to another during startup and shutdown, limiting the impact on ongoing traffic and reducing the risk of overload

Configuring Coherence Call-State Storage

The coherence.xml custom resource file specifies a subset of the configuration options that control call-state storage. The config.xml file specifies the custom resource file as $domain_home/config/custom/coherence.xml. The entry in the config.xml file looks like this:

<custom-resource>
    <name>coherence</name>
    <target>BEA_ENGINE_TIER_CLUST</target>
    <descriptor-file-name>custom/coherence.xml</descriptor-file-name>
    <resource-class>com.bea.wcp.sip.management.descriptor.
        resource.CoherenceStorageResource</resource-class>
    <resource-class>com.bea.wcp.sip.management.descriptor.resource.
        CoherenceStorageResource</resource-class>
    <descriptor-bean-class>oracle.occas.management.descriptor.beans.
        storage.CoherenceStorageBean</descriptor-bean-class>
</custom-resource>

The following parameters describe the coherence.xml file. They define a default call-state storage domain.

<?xml version='1.0' encoding='UTF-8'?>
<coherence-storage>
  <cache-config>
    <thread-count>20</thread-count>
    <partition-count>257</partition-count>
  </cache-config>
</coherence-storage>

Modifying the Call-State Storage Configuration

Note:

You cannot modify the configuration when servers in the domain are running.

To view and modify SIP call-state storage parameters:

  1. Log in to the Administration Console for the WebRTC Session Controller administration server.

  2. In the Domain Structure tree, click the SipServer node.

  3. Click the Configuration tab.

  4. Click the Call State Storage tab.

  5. Enter values for Thread Count or Partition Count or both.

  6. Click Save.

Table 11-1 describes the rules that apply to the Thread Count and Partition Count parameters:

Table 11-1 Call State Storage Configuration Parameters

Parameter Type Validation Rule Restart Server? Notes

Thread Count

integer

-1 to 32767

Yes

-1 = caller thread; 0 = service thread; otherwise, thread pool

Partition Count

integer

1 to 32767

Yes (all at the same time)

Must be prime number


The values are saved in the domain_home/config/custom/coherence.xml file where domain_home is the root directory of the WebRTC Session Controller domain.

You can also set call-state storage parameters using WLST. See "Using WLST (JMX) to Configure WebRTC Session Controller" for more information.

Monitoring Coherence Call-State Storage

To monitor SIP call-state storage:

  1. Log in to the Administration Console for the WebRTC Session Controller administration server.

  2. In the Domain Structure tree, click SipServer.

  3. Click the Monitoring tab.

  4. Click the Call State Storage tab.

  5. Click one of the following tabs, depending on the parameters you want to monitor: .

    • Call State Service

    • Call State Cache

    • Call State Metadata Cache

    • Call State Index Cache

    Tables 11-2 through 11-5 describe the parameters that you can monitor on these tabs.

Table 11-2 describes the parameters that you can monitor on the Service tab for each server:

Table 11-2 Call State Service Monitoring Parameters

Column Name MBean Attribute Description

Local Messages

MessagesLocal

The total number of self-addressed messages since the last time the statistics were reset. These messages service process-local requests and do not have an associated network cost.

Received Messages

MessagesReceived

The total number of messages received by this service since the last time statistics were reset. This value accounts for messages received by any local, dedicated, or shared transport.

Sent Messages

MessagesSent

The number of messages sent by this service since the last time statistics were reset. This value accounts for any messages sent by local, dedicated, or shared transport.

Owned Backup Partitions

OwnedPartitionsBackup

The number of partitions that this member backs up (responsible for the backup storage).

Owned Primary Partitions

OwnedPartitionsPrimary

The number of partitions that this member owns (responsible for the primary storage).

Endangered Partitions

PartitionsEndangered

The total number of partitions that are not backed up.

Unbalanced Partitions

PartitionsUnbalanced

The total number of primary and backup partitions that remain to be transferred until the distribution across storage-enabled service members is fully balanced.

Vulnerable Partitions

PartitionsVulnerable

The total number of partitions that are backed up on the same machine where the primary partition owner resides.

Average Request Duration

RequestAverageDuration

The average duration in milliseconds of an individual synchronous request issued by the service.

Max Request Duration

RequestMaxDuration

The maximum duration in milliseconds of a synchronous request issued by the service.

Pending Request Count

RequestPendingCount

The number of pending synchronous requests issued by the service.

Average Task Duration

TaskAverageDuration

The average duration in milliseconds of an individual task execution.

Task Backlog

TaskBacklog

The size of the backlog queue that holds tasks scheduled to be executed by one of the service threads

Max Task Backlog

TaskMaxBacklog

The maximum size of the backlog queue.

Idle Thread Count

ThreadIdleCount

The number of currently idle threads in the service thread pool.


Table 11-3 describes the parameters that you can monitor on the Call State Cache tab for each server. The cache name is CallState.

Table 11-3 Call State Cache Monitoring Parameters

Column Name MBean Attribute Name Description

Entry Count

Size

The number of call-state objects currently stored.

Data Size

Units

The total number of bytes of call-state objects used for call-state objects currently stored.


Table 11-4 describes the parameters that you can monitor on the Call State Metadata Cache tab for each server. The cache name is CallState.meta. These are call-state lock and timer entries.

Table 11-4 Call State Cache Metadata Monitoring Parameters

Column Name MBean Attribute Name Description

Entry Count

Size

The number of call-state meta data objects.

Data Size

Units

The total number of bytes used for call-state meta data objects.


Table 11-5 describes the parameters that you can monitor on the Call State Index Cache tab for each server. The cache name is CallState.idx. These are call-state secondary index entries.

Table 11-5 Call State Index Cache Monitoring Parameters

Column Name MBean Attribute Name Description

Entry Count

Size

The number of call-state secondary index entries currently stored.

Data Size

Units

The total number of bytes of call-state secondary index entries currently stored.


You can monitor all parameters by connecting directly to the servers using JConsole.