Chapter 29: Configuring Persistence Mechanisms
You can use in-memory storage to support failover for stateful components by choosing CtsComponents/HeapStorage as the storage component. This feature allows component state to be maintained on a pair of servers, without incurring the overhead of using a remote database to store component state.
The in-memory failover implementation is based on mirror pairs. A mirror pair consists of two servers that are members of a cluster. The servers use the EAServer message service to synchronize component session state held in memory. If one server in a mirror pair goes offline, the other remains to serve client sessions for the mirrored components. You can configure multiple mirror pairs within a cluster, but each server can be a member of only one mirror pair.
A cluster with mirror pairs configured as described in “Cluster configuration for in-memory failover”.
Component Mirror Cache configuration as described in “Mirror Cache tab component properties”.
A working message service on each server that is in a mirror pair. Chapter 8, “Setting up the Message Service,” in the EAServer System Administration Guide describes how to configure the message service.
Chapter 6, “Clusters and Synchronization,” in the EAServer System Administration Guide describes how to configure a cluster. To support in-memory failover, you must define mirror pairs within the cluster.
A mirror pair consists of two servers within the cluster that use the EAServer message service to replicate state information for session components hosted on those servers. Servers in a mirror pair should have the same set of stateful components installed. One server cannot be a member of more than one mirror pair.
Configuring mirror pairs
Display the Mirror Groups tab in the Cluster Properties dialog box.
Enter the IIOP URLs for the two servers in the mirror pair, separated by a comma. For example:
Repeat to add as many mirror pairs as required.
Configuring server session cache size
For each logical server in a mirror pair, configure
the server property
This property specifies the maximum size of the memory cache used
to hold session data for components running on the server. The value
has the same syntax as the Cache Size property described in “Mirror Cache tab component properties”.
On the Mirror Cache tab, configure the following:
Cache Size Specifies the maximum size of the cache used to hold session state for instances of this component. Specify the size in megabytes, kilobytes, or bytes with the syntax shown in the following table:
Cache size value syntax
n megabytes, for example:
n kilobytes, for example:
n bytes, for example:
The component’s cache size cannot be greater than
the size of the server’s in-memory session cache (specified
property). If the cache is not large enough, clients may experience
cache overflow errors. When this happens, the least recently accessed
instance is removed from the cache. If a client attempts to invoke
an instance, the client receives a CORBA::OBJECT_NOT_EXIST exception.
Timeout Specify a cache timeout value as a positive integer. This value is the number of seconds that cached state data remains valid. The cache timeout must be less than the Instance Timeout setting, and in most cases should be the same. The default is 10000 seconds.
|Copyright © 2005. Sybase Inc. All rights reserved.|