Flexible Replication Quick Start
- Last Updated: April 21, 2026
- 6 minute read
- MarkLogic Server
- Version 11.0
- Documentation
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:
- Creating Master and Replica Databases
- Configuring a Flexible Replication Pipeline for the Master Database
- Creating a Replication App Server
- Configuring Push Replication on the Master Database
- Scheduling Replication Push Task
- Loading Documents into the Master Database and Checking Replication
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.
Creating Master and Replica Databases
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.
- Create two forests, one for the Master database and one for the Replica database. For details on creating forests, see Creating a Forest in the Administrator's Guide.
- Create two databases, Master and Replica, and attach the respective forest to each database. For details on creating databases and attaching forests, see Creating a New Database and Attaching and/or Detaching Forests to/from a Database in the Administrator's Guide.
Configuring a Flexible Replication Pipeline for the Master Database
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.
-
Configure the Master database to use a triggers database.

-
Select Content Processing on the Master database:

-
In the Content Processing Summary, click on the Install tab:

-
On the Content Processing Installation page, click Install:

Then click OK.
-
Confirm that Flexible Replication appears in the Pipelines section of the Content Processing Summary page:

-
On the left-hand navigation menu, navigate to the Content Processing > Domains > Default Master > Pipelines page. Select the Status Change Handling and Flexible Replication pipelines and click OK:

Creating a Replication App Server
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.
-
Under the Replica database, navigate to Flexible Replication. On the Flexible Replication Administration page, click Create under Application Server:

-
On the Create HTTP Server page, specify a port number of the App Server. Set the other fields as required, but do not change the server name, root directory, or database settings, which have been pre-set by MarkLogic Server. When finished, click OK.

Configuring Push Replication on the Master Database
-
For the Master database, navigate to Flexible Replication on the Flexible Replication Administration page, and click Default Master under Content Processing:

-
Click Create to configure replication for the Default Master domain:

-
Click Create to configure a replication target for the Default Master domain:

-
In the Database Replication Target page, specify a target name, the target URL that includes the hostname and port number you specified for the Replica's App Server in Creating a Replication App Server.
Note:
In this example, you will be using a secure credential to access the Replica App Server, so the URL must start with
https.
-
In order to communicate securely with the Replica, you should configure a secure credential, as described in Secure Credentials in the Security Guide. Assuming that you have configured a secure credential, select the name of the credential from the credential id menu.

-
Click OK.
Note:
There are additional security options you may want to enable for your configuration, as described in Replication Security.
Scheduling Replication Push Task
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.
-
For the Master database, navigate to Flexible Replication and click Create under Scheduled Tasks:

-
Create a Scheduled Task that defines the frequency in which documents are to be replicated from the Master to the Replica. You must also specify the task user. Do not specify a task host. Click OK.

Loading Documents into the Master Database and Checking Replication
At this point, any documents loaded into the Master database will be replicated to the Replica database.
Note:
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:
- Using the XQuery load document functions, as described in Loading Content Using XQuery in the Loading Content Into MarkLogic Server Guide.
- Setting up a WebDAV server and client, such as Windows Explorer, to load your documents. See the section Simple Drag-and-Drop Conversion in the Content Processing Framework Guide for information on how to configure a WebDAV server to work with Windows Explorer.
- Creating an XCC application, as described in Using the Sample Applications in the XCC Developer's Guide.
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.