Replication

Replication provides added security, helping to ensure that an object is available for retrieval or update if the resource manager that contains the primary object is offline.

Replication is a feature of IBM® Content Manager with which you can create one or more replicas, or copies, of an object. To enhance retrievability and security, you can replicate object data from a primary resource manager to a replica resource manager. A replica resource manager might also be referred to as a backup resource manager or target resource manager. The replica resource manager is then available for retrieval and updates in case the primary resource manager is unavailable. When the primary resource manager is again available, it synchronizes with the replica. For these reasons, a replica is frequently created on a resource manager that is on a separate computer in a remote location. However, this setup is not a requirement for replicas. A local replica can also be set up on the same computer as the primary resource manager.

Replication is not intended to replace normal system backups. It is an additional tool to ease recovery from hardware failures, network failures, and similar events. The replication service replicates only those objects that are created or updated after replication rules are configured. The replication service does not automatically create replicas for objects created before the replication rules are configured.

IBM Content Manager supports two types of replication:

  • Asynchronous replication replicates new or updated objects according to the schedule set by the replication service. For more information, see Asynchronous replication
  • Synchronous replication replicates objects at the same time that they are created or updated. For more information, see Synchronous replication.

Asynchronous replication

Asynchronous replication uses the replicator service as a background process to create replicas, avoiding performance degradation during the creation or updating of an object. The replication service can be configured to take advantage of periods of low activity in the system to complete the asynchronous replication tasks. In addition, lower-performance computers can be used as replica resource managers because user create, read, update, and delete operations are not affected by replica creation. Higher-performance computers can be dedicated for use as primary resource managers for these operations. However, asynchronous replication does expose the replicas to possible data loss or corruption in the interval between the operations on the primary object and the replica objects.

With asynchronous replication, there is a built-in interval between the time when an object is created or updated and the time when its copies are created. The length of this interval is determined by the configuration of the replication service on the resource manager. For example, the replication service can be configured to check for potential objects to be replicated as frequently as once per minute. As an object is stored on its primary resource manager, a replication task is also created. The task to create the replica of the object is handled as a separate transaction by the replication service and the resource manager database. If a network outage causes replication to fail, then the next attempt to replicate is determined by the replication schedule of the resource manager.

Objects can also be replicated as they are migrated. When you configure the properties of the target collection for objects that are migrated to a remote resource manager, you can select an option to replicate objects as they are migrated to the target collection. Selecting this option enables failover support for objects that are migrated to a remote resource manager. If the migration to the target collection fails because the primary target resource manager is unavailable, then the objects are migrated to the replica resource manager defined in the collection. When the primary target resource manager is available, the objects are replicated to the primary target resource manager and any other replicas that are defined in the collection for the primary target resource manager.

You define options for the replication service when you define a resource manager configuration in the New Resource Manager Configuration window of the system administration client. On the Replicator Schedule page, you can define the replicator schedule to specify when you want the replicator to run. On the Cycles page, you can set the amount of time before the system determines whether replication is necessary. You define the target resource managers for asynchronous replication when you define the collection.

Tip: Run the replicator during times when there is little server activity.

When you define a resource manager in the New Resource Manager Definition window of the system administration client, you can mark a resource manager as unavailable. You might want to mark a resource manager as unavailable if the server is down or is under maintenance. If you mark the resource manager as unavailable, a client bypasses this server and does not store or retrieve objects on it.

In the Library Server Configuration window, you can set the number of seconds that the library server waits to check for the availability of resource managers. You can also set the number of seconds that the library server waits for a response from the resource manager before considering it to be unavailable.

Synchronous replication

Synchronous replication is a process to ensure that replicas for an object are created at the same time as the primary object. Some regulated industries have strict policies for the replication of objects. In those policies, the creation of all copies for an object or the creation of a certain number of copies of that object must occur synchronously. These policies are intended to ensure that mission-critical data is not exposed to the data loss or corruption that is possible during asynchronous replication.

During synchronous replication, operations are occurring on primary and replica objects in the same transaction. The operations are occurring on different resource managers, possibly with widespread physical locations. Therefore, synchronous replication consumes more database, disk, and I/O and network bandwidth resources, with a greater chance of failure at some point during the transaction. For those reasons, ensure that the resource manager computers used for synchronous replicas are as powerful as the primary resource manager. Also ensure that network bandwidth from the client to the replica resource managers is the same as from the client to the primary resource manager.

Some synchronous replication policies require all replicas for an object to be created in the same transaction as the create or update operation for that object. IBM Content Manager synchronous replication meets that requirement. If the creation of any replica fails, the entire operation is rolled back. The operations that are rolled back include the creation or update of the primary object and the creation of any replicas that succeeded.

However, some synchronous replication policies are less strict and do not require all replicas to be created synchronously. In those cases, the synchronous creation of at least two copies of an object, either the primary object and the replica or two replicas, is sufficient to satisfy the replication policy. IBM Content Manager provides a tolerance mode for synchronous replication to meet this minimum requirement. The tolerance mode for synchronous replication enables the create or update operation of a primary object to continue if at least one other copy of the object is saved in a remote resource manager. It also allows the operation to continue if the primary fails but at least two replicas are saved on two remote resource managers. The creation of a local replica on the same resource manager as the primary object does not meet the two-copy requirement. Other replicas of that object can then be created asynchronously according to the replication schedule for the primary resource manager.

You can enable synchronous replication on a new or existing collection. The target resource managers and collections used for asynchronous replication are also used for synchronous replication. If no replication rules are defined on the collection, synchronous replication has no effect because there are no replicas to synchronize. There are two exceptions to this rule that enable synchronous replication to occur:
  • If the primary resource manager or collection previously had replication rules and replicas were created, but the rules were removed. The synchronous replication can occur on those existing replicas.
  • If objects on a primary resource manager or collection that have replicas are migrated to a new collection where synchronous replication is enabled. The synchronous replication can occur even if replication rules are not defined on the new primary resource manager.
Important: If migration is enabled for a collection that is also enabled for synchronous replication, the migration operation itself does not trigger replication. Only a create or update operation on the object triggers the synchronous replication.

Examples of using replication

Replication example with asynchronous replication and synchronous replication with tolerance mode

This example demonstrates how asynchronous replication and synchronous replication with the tolerance mode work together. The tolerance mode ensures that a minimum number of copies of an object are saved in the same transaction as the create or update operation. The following resource managers are configured:
  • Resource manager A (RM A) contains collection A (Coll A). RM A/Coll A is configured to replicate asynchronously to resource manager B (RM B) and collection B (Coll B). RM A/Coll A is also configured to replicate asynchronously to resource manager C (RM C) and collection C (Coll C).
  • For this collection, industry regulations mandate that multiple copies of an object are saved simultaneously to primary and backup resources. Therefore, for RM A/Coll A, the synchronous replication option is selected. Selecting this option means that all replicas for the object are created in the same transaction as a create or update operation on the primary object.
  • However, the option for the tolerance mode is also selected for RM A/Coll A. Selecting this option means that a create or update operation on the primary object is successful if the synchronous creation of at least one replica on a remote resource manager is successful.
  • RM B/Coll B is one target resource manager and collection of the asynchronous replication from RM A/Coll A.
  • RM C/Coll C is another target resource manager and collection for the asynchronous replication from RM A/Coll A.

An object created and updated on the primary resource manager and collection RM A/Coll A would move through these resource managers and collections as different operations occur.

Table 1. Lifecycle of an object with asynchronous replication and synchronous replication with tolerance mode enabled
Operation on the object RM A/Coll A RM B/Coll B RM C/Coll C
Object is created in RM A/Coll A. Synchronous replication succeeds for RM B/Coll B and fails for RM C/Coll C. Primary object Replica object  
Asynchronous replication to RM B/Coll B and RM C/Coll C occurs through the replication schedule for RM A/Coll A. Primary object Replica object Replica object
Object is updated with update 1. Synchronous replication fails for RM B/Coll B and succeeds for RM C/Coll C. Primary object with update 1 Replica object Replica object with update 1
Asynchronous replication to RM B/Coll B and RM C/Coll C occurs through the replication schedule for RM A/Coll A. Primary object with update 1 Replica object with update 1 Replica object with update 1

Replication example with asynchronous replication, synchronous replication, and migration

This example demonstrates how asynchronous and synchronous replication can integrate during the lifecycle of an object. The object is eventually migrated to another resource manager and collection for long-term storage. The following resource managers are configured:
  • Resource manager A (RM A) contains collection A (Coll A). RM A/Coll A is configured to replicate asynchronously to resource manager B (RM B) and collection B (Coll B). RM A/Coll A is also configured to migrate objects to resource manager C (RM C) and collection C (Coll C).
  • RM B/Coll B is the target resource manager and collection of the asynchronous replication from RM A/Coll A.
  • RM C/Coll C is the target resource manager and collection for the migration from RM A/Coll A and is configured for the replication of migrated objects. RM C/Coll C is also configured to replicate to resource manager D (RM D) and collection D (Coll D). For RM C/Coll C, the synchronous replication option is selected.
  • RM D/Coll D is the target resource manager and collection of the synchronous replication from RM C/Coll C.
  • The objects in RM C/Coll C are migrated from RM A/Coll A. RM B/Coll B is a replica of RM A/Coll A. Because replication of migrated objects is configured on RM C/Coll C, RM B/Coll B is another target resource manager for replication from RM C/Coll C. Because the collection RM C/Coll C is configured for synchronous replication, the replication to both RM B/Coll B and RM D/Coll D happens synchronously.

An object created on the primary resource manager and collection RM A/Coll A would move through these resource managers and collections as different operations occur during its lifecycle.

Table 2. Lifecycle of an object with asynchronous replication, migration, and synchronous replication
Operation on the object RM A/Coll A RM B/Coll B RM C/Coll C RM D/Coll D
Object is created in RM A/Coll A. Primary object      
Object is updated with update 1. Primary object with update 1      
Object is asynchronously replicated with replication schedule of RM A/Coll A. Primary object with update 1 Replica object with update 1    
Object is migrated with migration schedule of RM A/Coll A. The object is only migrated, not created or updated, so no synchronous replication occurs from RM C/Coll C.   Replica object with update 1 Primary object with update 1  
Object is updated with update 2. Synchronous replication from RM C/Coll C succeeds to RM B/Coll B to update the replica object. Synchronous replication succeeds to RM D/Coll D to create the replica object.   Replica object with update 2 Primary object with update 2 Replica object with update 2