This chapter provides the quick-start procedures for creating a simple flexible replication configuration on a single MarkLogic Server. Typical flexible replication configurations will have the Master and Replica databases on different MarkLogic Servers located on different hosts. Replicated MarkLogic Servers may reside in the same cluster or in different clusters. In order to keep the hardware requirements to a minimum, this quick start describes how to set up replication between two databases on the same MarkLogic Server.
Before attempting to configure replication, create a Master and a Replica database. In these examples, the databases are named Master and Replica. However, you can use any name you wish for either the master or its replica.
This section describes how to configure the Content Processing Framework (CPF) for the replicated domains on the Master database. In order to replicate data, CPF on the Master domains must be configured with the Status Change Handling and Flexible Replication pipelines. In this example, we use the existing Triggers database. However, if you are replicating more than one database, you should create a separate CPF database for each master database.
In a push replication configuration, the Replica database must be connected to a Replication App Server, an HTTP server used to communicate between the Master database and the Replica database. In a pull replication configuration, the Master database must be connected to a Replication App Server.
flexrep-userrole on the Replica's App Server. Click OK.
You must create a scheduled task to periodically push updated content on the Master to the Replicas. When a document is updated on the Master, it is immediately replicated to the Replica. A scheduled replication task provides a retry mechanism in the event the initial replication fails. A task is also required to replicate deletes and to replicate all of the documents that were on the master before replication was enabled. For more information on scheduled replication tasks, see Creating a Scheduled Replication Task.
One way to confirm the content has been replicated to the replica is to use the explore feature in Query Console to view the contents of the Replica database. For details on how to use Query Console to explore the contents of a database, see Exploring a Database in the Query Console User Guide.