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.
This chapter includes the following sections:
All of the procedures described in this chapter are done using the Admin Interface described in the Administrative Interface chapter in the Administrator's Guide.
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.
The following procedure describes how to create an App Server for a Replica in a push replication configuration.
In this example, you will be using a secure credential to access the Replica App Server, so the URL must start with https
.
There are additional security options you may want to enable for your configuration, as described in Replication Security.
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.
At this point, any documents loaded into the Master database will be replicated to the Replica database.
Be sure to load your data using the same URI as specified in your replicated domain. For example, if you use the default URI (/), make sure all of your document names start with '/'.
Methods for loading content into a database include:
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.