Agent High Availability

To prevent it from becoming a single point of failure run multiple instances of Oracle Health Insurance Agent in a clustered fashion. Implications:

  • All Agent instances retrieve the same configuration from Oracle Insurance Gateway. Oracle Insurance Gateway ensures that any event that needs to be handled by Oracle Health Insurance Agent is dispatched to one and only of the connected Agent instances.

  • All Agent instances poll for inbound files. Thus, all Agent instances need access to the same folders. The cluster ensures that any inbound file is processed once.

  • Oracle Coherence is used to create a cluster of Agent instances. An Agent instance in the cluster is also referred to as a Member (of the cluster). Operating a Coherence cluster of multiple Agent Members requires Coherence-specific configuration that is explained in this section.

what follows does not explain all Oracle Coherence options and is not meant to replace the Oracle Coherence documentation that is available here.

Setting Up a Cluster of Multiple Oracle Health Insurance Agent Members

Configure Oracle Coherence via command-line options, using an override file, or by applying a combination of these.

Oracle Health Insurance Agent ships with the following Coherence override file (tangosol-coherence-override.xml) that contains the basic Coherence configuration:

<?xml version="1.0"?>
<coherence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns="http://xmlns.oracle.com/coherence/coherence-operational-config"
           xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-operational-config coherence-operational-config.xsd">

  <cluster-config>
    <member-identity>
      <cluster-name system-property="tangosol.coherence.cluster">ohi-agent-cluster (1)
      </cluster-name>
    </member-identity>
  </cluster-config>

  <logging-config>
    <destination system-property="tangosol.coherence.log">slf4j</destination> (2)
    <severity-level system-property="tangosol.coherence.log.level">3</severity-level> (3)
  </logging-config>

  <configurable-cache-factory-config>
    <init-params>
      <init-param>
        <param-type>java.lang.String</param-type>
        <param-value system-property="tangosol.coherence.cacheconfig">ohi-agent-cache-config.xml (4)
        </param-value>
      </init-param>
    </init-params>
  </configurable-cache-factory-config>

</coherence>
1 In order to join a cluster all members must use the same cluster name
2 Set the Log destination to slf4j to fold Coherence logs into Oracle Health Insurance Agent logs
3 Use this log level for logging Coherence errors, warnings and informational messages
4 Reference the Coherence cache configuration that is bundled with Oracle Health Insurance Agent to prevent falling back to the default Coherence setup which is not suitable for production use
use variants of the override file for different environment. For example, use the following tangosol-coherence-override-dev.xml file in a development environment:
<?xml version="1.0"?>
<coherence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns="http://xmlns.oracle.com/coherence/coherence-operational-config"
           xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-operational-config coherence-operational-config.xsd">

  <cluster-config>
    <member-identity>
      <cluster-name system-property="tangosol.coherence.cluster">ohi-agent-dev-cluster (1)
      </cluster-name>
    </member-identity>
  </cluster-config>

  ...

</coherence>
1 For example, use an environment-specific cluster name

Use the override file for running Oracle Health Insurance Agent by executing the following command:

java -Dtangosol.coherence.override=tangosol-coherence-override.xml -jar ohi-agent.jar

Alternatively, configure Oracle Coherence using Java command-line options as is shown in the following example:

java -Dtangosol.coherence.cacheconfig=ohi-agent-cache-config.xml \
     -Dtangosol.coherence.cluster=ohi-agent \
     -Dtangosol.coherence.log=slf4j \
     -Dtangosol.coherence.log.level=3 \
     -Dtangosol.coherence.mode=prod \ (1)
-jar ohi-agent.jar \
     --server.port=9997 (2)
1 Use Coherence production mode
2 Make sure to specify separate ports for each Oracle Health Insurance Agent instance when running multiple Agent instances on a single machine

Configure Coherence Networking

By default, Oracle Coherence makes use of multicast networking. If multicast is undesirable or unavailable in an environment, then setting up the Coherence Well Known Addresses (WKA) feature is required.

The following sample script starts two Oracle Health Insurance Agent instances on a single machine fererred to as localhost. Use of the WKA feature restricts the cluster to members that run on that machine only.

nohup \
java -Dtangosol.coherence.override=tangosol-coherence-override.xml \
     -Dtangosol.coherence.wka=localhost \
     -Dtangosol.coherence.wka.port=20000 \
     -Dtangosol.coherence.localport=20000 \
-jar ohi-agent.jar \
     --server.port=8000 & > ohi-agent-8000.out

nohup \
java -Dtangosol.coherence.override=tangosol-coherence-override.xml \
     -Dtangosol.coherence.wka=localhost \
     -Dtangosol.coherence.wka.port=20000 \
     -Dtangosol.coherence.localport=20010 \
-jar ohi-agent.jar \
     --server.port=8010 & > ohi-agent-8010.out
Consult the Oracle Coherence documentation for additional information on setting up a cluster.