# MongoDB Atlas (v1)

Information note **MongoDB Atlas extraction is supported by Stitch**   
This integration is powered by [Singer's](https://www.singer.io/) MongoDB Atlas tap and certified by Stitch. [Check out and contribute to the repo on GitHub](https://github.com/singer-io/tap-mongodb).  
  
For support, contact [Support](https://community.qlik.com/t5/Support/ct-p/qlikSupport).

## MongoDB Atlas integration summary

Stitch’s MongoDB Atlas integration replicates data using the [PyMongo 3.8.0](https://docs.mongodb.com/ecosystem/drivers/pymongo/) driver.

## MongoDB Atlas feature snapshot

A high-level look at Stitch's MongoDB Atlas (v1) integration, including release status, useful links, and the features supported in Stitch.

| **STITCH** |  |  |  |
| --- | --- | --- | --- |
| **[Release status](https://help.qlik.com/en-US/stitch/integrations/identify-an-integration-version)** | Deprecated on February 14, 2020 | **Supported by**<br><br>the Info icon<br><br>Indicates if the integration is supported by Stitch or the Singer community. | [Stitch](https://community.qlik.com/t5/Support/ct-p/qlikSupport) |
| **Stitch plan**<br><br>the Info icon<br><br>The type of Stitch plan required to use the integration. | Standard | **Supported versions**<br><br>the Info icon<br><br>Indicates if the integration is supported by Stitch or the Singer community. | 2.6 through 4.0 |
| **[API availability](https://help.qlik.com/en-US/stitch/developers/stitch-connect/guides/source-destination-reference)**<br><br>the Info icon<br><br>Indicates if the integration is available as a source in Stitch Connect. | the Remove icon<br><br>This version of the integration isn't available via the API.<br><br><br>Not available | **Singer GitHub repository** | [singer-io/tap-mongodb](https://github.com/singer-io/tap-mongodb) |
| **CONNECTION METHODS** |  |  |  |
| **SSH connections**<br><br>the Info icon<br><br>Indicates if SSH tunnels are supported for connecting this database to Stitch. | the Remove icon<br><br>This feature is not supported for this version of the integration.<br><br><br>Unsupported | **SSL connections**<br><br>the Info icon<br><br>Indicates if SSL connections are supported for connecting this database to Stitch. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported |
| **REPLICATION SETTINGS** |  |  |  |
| **[Anchor Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/anchor-scheduling)**<br><br>the Info icon<br><br>A type of replication scheduling where an integration's Replication Frequency is anchored to a time you select. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported | **[Advanced Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/advanced-scheduling)**<br><br>the Info icon<br><br>A type of replication scheduling that allows you to specify granular start times for data extraction using cron expressions. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported |
| **Table-level reset**<br><br>the Info icon<br><br>Indicates if data can be reset at the table level. If unsupported, data can only be reset at the integration level. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported | **[Configurable Replication Methods](https://help.qlik.com/en-US/stitch/replication/replication-methods)**<br><br>the Info icon<br><br>Indicates if Replication Methods can be defined by you for tables in the integration. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported |
| **REPLICATION METHODS** |  |  |  |
| **[Log-based Replication](https://help.qlik.com/en-US/stitch/replication/replication-methods/log-based-incremental)**<br><br>the Info icon<br><br>Log-based Incremental Replication is a replication method in which Stitch identifies modifications to records - including inserts, updates, and deletes - using a database's binary log files. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported | **[Key-based Replication](https://help.qlik.com/en-US/stitch/replication/replication-methods/key-based-incremental)**<br><br>the Info icon<br><br>Key-based Incremental Replication is a replication method in which Stitch identifies new and updated data using a column called a Replication Key. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported |
| **[Full Table Replication](https://help.qlik.com/en-US/stitch/replication/replication-methods/full-table)**<br><br>the Info icon<br><br>Full Table Replication is a replication method in which all rows in a table - including new, updated, and existing - are replicated during every replication job. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported |  |  |
| **DATA SELECTION** |  |  |  |
| **Table selection**<br><br>the Info icon<br><br>The ability to select individual tables for replication in the Stitch interface. If table selection is unavailable, all tables and all the columns they contain will be set to replicate by default. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported | **Column selection**<br><br>the Info icon<br><br>The ability to select individual columns for replication in the Stitch interface. If column selection is unavailable, all columns will be set to replicate by default. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported |
| **[View replication](https://help.qlik.com/en-US/stitch/replication/replicating-database-views)**<br><br>the Info icon<br><br>Indicates if Stitch supports replicating views from this database integration. | the Remove icon<br><br>This feature is not supported for this version of the integration.<br><br><br>Unsupported | **Select all**<br><br>the Info icon<br><br>Indicates if the integration supports selecting all available tables and columns. | the Success icon<br><br>Supported<br><br><br>Supported |
| **TRANSPARENCY** |  |  |  |
| **[Extraction Logs](https://help.qlik.com/en-US/stitch/replication/extractions/integration-extraction-logs)**<br><br>the Info icon<br><br>Logs detailing the Extraction phase of the replication process for a given integration. Includes error info, should an error occur. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported | **[Loading Reports](https://help.qlik.com/en-US/stitch/replication/integration-loading-reports)**<br><br>the Info icon<br><br>Reports detailing the Loading phase of the replication process for a given integration. Includes the number of rows loaded for each table and error info, should an error occur. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported |

## Connecting MongoDB Atlas

### MongoDB Atlas setup requirements

To set up MongoDB Atlas in Stitch, you need:

* **Privileges in MongoDB Atlas that allow you to create/manage users.** This is required to create the Stitch database user.

* **A MongoDB Atlas database using a version between 2.6 and 4.0.** While older versions may be connected to Stitch, we may not be able to provide support for issues that arise due to unsupported versions.

  We recommend always keeping your version current as a best-practice. If you encounter connection issues or other unexpected behavior, verify that your MongoDB Atlas version is one supported by Stitch.

### Step 1: Verify your Stitch account's data pipeline region

First, you’ll log into Stitch and verify the data pipeline region your account is using. Later in this guide, you’ll need to grant Stitch access by whitelisting our IP addresses.

The IP addresses you’ll whitelist depend on the [**Data pipeline region** your account is in](https://help.qlik.com/en-US/stitch/security/supported-data-pipeline-regions).

1. [Sign into your Stitch account](https://app.stitchdata.com/), if you haven’t already.

2. Click **User menu (your icon) &gt; Edit User Settings** and locate the **Data pipeline region** section to verify your account’s region.

3. Locate the list of IP addresses for your region:

   * [North America region IP addresses](https://help.qlik.com/en-US/stitch/security/stitch-ip-addresses#north-america-ip-addresses)

   * [Europe region IP addresses](https://help.qlik.com/en-US/stitch/security/stitch-ip-addresses#europe-ip-addresses)

Keep this list handy - you’ll need it later.

### Step 2: Configure database connection settings

In this step, you’ll configure your MongoDB Atlas cluster to allow traffic from Stitch to access it. This is accomplished by whitelisting Stitch’s IP addresses in the cluster’s IP address whitelist in MongoDB Atlas.

Information note **Note**: This guide assumes your current IP address has already been whitelisted and can access your MongoDB Atlas cluster. If you haven’t done this, you can add your own IP to the cluster whitelist while performing the steps in this section.

1. In MongoDB Atlas, navigate to the project containing the cluster you want to connect to Stitch. You can do this using the **Context** menu in the top left corner of the page.
2. Click **Network Access** in the **Security** section on the left side of the page.
3. Click **+ Add IP address** on the **Network Access** page.

![Add Whitelist Entry window for whitelisting IP addresses in MongoDB Atlas](https://help.qlik.com/en-US/stitch/images/shared/whitelisting-ips/mongodb-atlas-whitelist-entry.png)Add Whitelist Entry window for whitelisting IP addresses in MongoDB AtlasAdd Whitelist Entry window for whitelisting IP addresses in MongoDB Atlas

1. Fill in the fields in the **Add Whitelist Entry** window as follows:
   * **Whitelist Entry**: Paste one of the IP addresses you retrieved in [Step 1](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb-atlas/v1#verify-stitch-account-region) for your Stitch data pipeline region.
   * **Comment**: Enter `Stitch`.
2. Click **Confirm**.
3. Repeat steps 3-5 until all the IP addresses for your Stitch data pipeline region have been added. This is what the list might look like for Stitch’s North America IP addresses:

![List of whitelisted Stitch's North America IP addresses in the Network Access page of MongoDB Atlas](https://help.qlik.com/en-US/stitch/images/shared/whitelisting-ips/mongodb-atlas-network-access.png)List of whitelisted Stitch's North America IP addresses in the Network Access page of MongoDB AtlasList of whitelisted Stitch's North America IP addresses in the Network Access page of MongoDB Atlas

### Step 3: Create a Stitch database user

* Instructions
* Privileges list

1. In MongoDB Atlas, navigate to the project containing the cluster you want to connect to Stitch. You can do this using the **Context** menu in the top left corner of the page.
2. Click **Database Access** in the **Security** section on the left side of the page.
3. Click the **+ Add new user** button on the **Database Access** page.

![](https://help.qlik.com/en-US/stitch/images/integrations/mongodb-atlas-add-user.png)

1. Fill in the fields as follows in the **Add New User** window that displays:
   * **Username**: Enter `stitch`.
   * **Password**: Enter a secure password for the Stitch user.
2. Click the **Add Default Privileges** link.
3. In the **Default Privileges** section:
   1. Select the `read` role from the dropdown and enter `local` into the **Database** field.
   2. Click the **+add another role** link.
   3. Select the `readAnyDatabase` role from the dropdown. The **Database** field should be automatically populated with `admin`.
4. Click **Add User** when finished.

See the **Privileges list** tab for an explanation of why these permissions are required by Stitch.

In the table below are the database user privileges Stitch requires to connect to and replicate data from a MongoDB Atlas database.

| **Privilege name** | **Reason for requirement** |
| --- | --- |
| [read](https://docs.mongodb.com/v4.0/reference/built-in-roles/#read) | Required to read from the [`local` database](https://docs.mongodb.com/v4.0/reference/local-database/). |
| [readAnyDatabase](https://docs.mongodb.com/v4.0/reference/built-in-roles/#readAnyDatabase) | Required to read data from databases in the cluster. |

### Step 4: Connect Stitch

In this step, you’ll complete the setup by entering the database’s connection details and defining replication settings in Stitch.

In this section:

* [Step 3.1: Locate the database connection details in Mongo Atlas](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb-atlas/v1#locate-database-connection-details)

* [Step 3.2: Define the database connection details](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb-atlas/v1#define-connection-details)

* [Step 3.3: Define the SSL connection details](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb-atlas/v1#ssl-connection-details)

* [Step 3.4: Define Log-based Replication setting](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb-atlas/v1#define-log-based-replication-setting)

* [Step 3.5: Create a replication schedule](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb-atlas/v1#create-replication-schedule)

* [Step 3.6: Save the integration](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb-atlas/v1#save-integration)

#### Step 4.1: Locate the database connection details in Mongo Atlas

1. In MongoDB Atlas, click **Clusters** under the **Atlas** section on the left side of the page.

2. Locate the cluster you want to connect to Stitch.

3. Click **Connect**. This will display a window with several connection options. ![Connect with the Mongo Shell connection option in MongoDB Atlas](https://help.qlik.com/en-US/stitch/images/integrations/mongodb-atlas-connection-options.png)Connect with the Mongo Shell connection option in MongoDB AtlasConnect with the Mongo Shell connection option in MongoDB Atlas

4. Click **Connect with the Mongo Shell**.

5. Click **I have the Mongo Shell installed**.

6. For **Select your Mongo Shell version**, select **3.4 or earlier**.

7. Copy the **connection string**. It will look something like this:

   ```
   mongo "mongodb://test-shard-00-00-ddreq.mongodb.net:27017,test-shard-00-01-ddreq.mongodb.net:27017/test?replicaSet=test-shard-0" --ssl --authenticationDatabase admin --username <username> --password <password>
   ```

8. Locate the following in the connection string:

   * **Host (Endpoint)**: This is the address of the instance you’re connecting to Stitch. It will be formatted like this: `<some-address>.mongodb.net`. In this example, the host is `test-shard-00-00-ddreq.mongodb.net`.
   * **Port**: This is the port used to connect to the database. It follows the host string, separated by a colon (`:`). The default is `27017`, which is what this example is also using.
   * **Replica set**: This is used to perform Log-based Incremental Replication. Locate `replicaSet` in the connection string - the value that follows is the name of the replica set. In this example, the replica set is `test-shard-0`.

#### Step 4.2: Define the database connection details

1. If you aren’t signed into your Stitch account, [sign in now](https://app.stitchdata.com/).

2. On the Stitch Dashboard page, click the **Add Integration** button.

3. Locate and click the **MongoDB** icon.

4. Fill in the fields as follows:

   * **Integration Name**: Enter a name for the integration. This is the name that will display on the Stitch Dashboard for the integration; it’ll also be used to create the schema in your destination.

     For example, the name “Stitch MongoDB Atlas” would create a schema called `stitch_mongodb_atlas` in the destination. **Note:** The schema name cannot be changed after the integration is saved.

   * **Host (Endpoint)**: Paste the **Host (Endpoint)** you retrieved in the previous step ([4.1](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb-atlas/v1#locate-database-connection-details)). This should be similar to `<some-address>.mongodb.net`.

   * **Port**: Paste the **Port** you retrieved in the previous step ([4.1](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb-atlas/v1#locate-database-connection-details)). The default is `27017`.

   * **Username**: Enter the Stitch MongoDB Atlas database user’s username.

   * **Password**: Enter the password for the Stitch MongoDB Atlas database user.

   * *\*\**: Enter the name of the MongoDB Atlas database where the Stitch user is to be authenticated. Stitch will ‘find’ all the databases you gave the Stitch user access to - this is needed only to complete the connection.

     **Note:** If you’re connecting an Atlas-based MongoDB Atlas instance, this must be the `admin` database. See the [Create a Mongo database user section](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb-atlas/v1#create-database-user) for more info on this requirement.

   * **Authentication Database**: This must be `admin`. This is the name of the Stitch user’s [authentication database](https://docs.mongodb.com/v3.4/core/security-users/#user-authentication-database). This is the name of the database where the [Stitch database user was initially created](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb-atlas/v1#create-database-user).

   * **Replica Set**: **Optional.** The name of the replica set you retrieved in the previous step ([4.1](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb-atlas/v1#locate-database-connection-details)) to be used for Log-based Incremental Replication.

   * **Include MongoDB database names in destination tables**: Checking this setting will include schema names from the source database in the destination table name - for example: `<source_schema_name>__<collection_name>`.

     Stitch loads all selected replicated tables to a single schema, preserving only the collection name. If two collections canonicalize to the same name - even if they’re in different source databases or schemas - name collision errors can arise. Checking this setting can prevent these issues.

     **Note**: This setting can not be changed after the integration is saved. Additionally, this setting may create table names that exceed your destination’s limits. For more info, refer to the [Database Integration Table Name Collisions guide](https://help.qlik.com/en-US/stitch/troubleshooting/data-discrepancies/database-integration-table-name-collisions).

#### Step 4.3: Define the SSL connection details

Click the **Connect using SSL** checkbox. MongoDB Atlas requires SSL to connect successfully.

#### Step 4.4: Define Log-based Replication setting

Information note **Note**: Skip this step if you’re not planning to use Log-based Incremental Replication. [Click to skip ahead](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb-atlas/v1#create-replication-schedule).

In the **Log-based Replication** section, you can set this as the integration’s default Replication Method.

When enabled, tables that are set to replicate will use [Log-based Incremental Replication](https://help.qlik.com/en-US/stitch/replication/replication-methods/log-based-incremental) by default. If you don’t want a table to use Log-based Incremental Replication, you can change it in the Table Settings page for that table.

If this setting isn’t enabled, you’ll have to select a [Replication Method](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb-atlas/v1#sync-data) for each table you set to replicate.

#### Step 4.5: Create a replication schedule

Information note Replication schedules affect the time Extraction begins, not the time to data loaded. Refer to the [Replication Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling) documentation for more information.

In the **Replication Frequency** section, you’ll create the integration’s [replication schedule](https://help.qlik.com/en-US/stitch/replication/replication-scheduling). An integration’s replication schedule determines how often Stitch runs a replication job, and the time that job begins.

MongoDB Atlas integrations support the following replication scheduling methods:

* [Replication Frequency](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/replication-frequency)

* [Anchor Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/anchor-scheduling)

* [Advanced Scheduling using Cron](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/advanced-scheduling) (Advanced or Premium plans only)

To keep your row usage low, consider setting the integration to replicate less frequently. See the [Understanding and Reducing Your Row Usage guide](https://help.qlik.com/en-US/stitch/getting-started/understanding-stitch-usage) for tips on reducing your usage.

#### Step 4.6: Save the integration

When finished, click **Check and Save**.

Stitch will perform a connection test to the MongoDB Atlas database; if successful, a *Success!* message will display at the top of the screen. **Note**: This test may take a few minutes to complete.

### Step 5: Select data to replicate

Information note **Is an object missing or not replicating?** Verify that the object meets the requirements for [selection](https://help.qlik.com/en-US/stitch/replication/extractions/data-selection/setting-tables-and-columns-to-replicate#selection-requirements) and [replication](https://help.qlik.com/en-US/stitch/replication/extractions/data-selection/setting-tables-and-columns-to-replicate#replication-requirements).

The last step is to select the collections and fields you want to replicate. [](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb-atlas/v1#schema)

**Note**: If a replication job is currently in progress, new selections won’t be used until the next job starts.

* Selection options
* Individual collections and fields
* All collections and fields

For MongoDB Atlas integrations, you can select:

1. **Individual collections and fields**

2. **All collections and fields**

Click the tabs to view instructions for each selection method.

1. In the Integration Details page, click the **Collections to Replicate** tab.

2. Locate a collection you want to replicate.

3. Click the **checkbox** next to the collection’s name. A blue checkmark means the collection is set to replicate.

4. On the page that displays, click the **Collection Settings** button.

5. In the **Collection Settings** page:

   1. Define the collection’s **Replication Method**, or skip this step if you want to use the [integration’s default method](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb-atlas/v1#define-log-based-replication-setting).

   2. If using [Key-based Incremental Replication](https://help.qlik.com/en-US/stitch/replication/replication-methods/key-based-incremental), select a [Replication Key](https://help.qlik.com/en-US/stitch/replication/replication-keys).

   3. **Optional**: Select or exclude fields by entering a projection query in the **Fields to Replicate** section. Refer to the [Selecting MongoDB Fields Using Projection Query guide](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb/field-selection-using-projection-queries) for instructions and examples.

   4. When finished, click **Update Settings**.

6. Repeat this process for every collection you want to replicate.

7. Click the **Finalize Your Selections** button at the bottom of the page to save your data selections.

Information note **Important**: Using the **Select All** feature will overwrite any previous selections. However, selections aren’t final until **Finalize Your Selections** is clicked. Clicking **Cancel** will restore your previous selections. Refer to the [Select All guide](https://help.qlik.com/en-US/stitch/replication/extractions/data-selection/setting-tables-and-columns-to-replicate#set-all-data-to-replicate) for more info about this feature.

1. Click into the integration from the Stitch Dashboard page.

2. Click the **Tables to Replicate** tab.

3. Navigate to the collection level, selecting any databases and/or schemas that contain collections you want to replicate.

4. In the list of collections, click the box next to the **Collection Names** column.

5. In the menu that displays, click **Track AllCollections (Except Views)**:

   ![The Track AllCollections (Except Views) menu in the Collections to Replicate tab](https://help.qlik.com/en-US/stitch/images/replication/select-all-tables-menu.png)The Track AllCollections (Except Views) menu in the Collections to Replicate tabThe Track AllCollections (Except Views) menu in the Collections to Replicate tab

6. Click the **Finalize Your Selections** button at the bottom of the page to save your data selections.

### Initial and historical replication jobs

After you finish setting up MongoDB Atlas, its **Sync Status** may show as **Pending** on either the Stitch Dashboard or in the Integration Details page.

For a new integration, a **Pending** status indicates that Stitch is in the process of scheduling the initial replication job for the integration. **This may take some time to complete.**

Information note

**Initial replication jobs with Anchor Scheduling**

If using Anchor Scheduling, an initial replication job may not kick off immediately. This depends on the selected Replication Frequency and Anchor Time. Refer to the [Anchor Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling#job-scheduling-and-anchor-times) documentation for more information.

#### Free historical data loads

The first seven days of replication, beginning when data is first replicated, are free. Rows replicated from the new integration during this time won’t count towards your quota. Stitch offers this as a way of testing new integrations, measuring usage, and ensuring historical data volumes don’t quickly consume your quota.

Information note **Replication will continue after the seven days are over**. If you’re no longer interested in this source, be sure to **pause** or **delete** the integration to prevent unwanted usage.

## MongoDB Atlas replication

* [MongoDB Replication Keys](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb-atlas/v1#mongo-replication-keys)

* [Heavily nested data and destination column limits](https://help.qlik.com/en-US/stitch/integrations/databases/mongodb-atlas/v1#nested-data-replication-column-limits)

### MongoDB Replication Keys

Unlike Replication Keys for other database integrations, those for MongoDB have special considerations due to MongoDB functionality. For example: MongoDB allows multiple data types in a single field, which can cause records to be skipped during replication.

Refer to the [MongoDB Replication Keys guide](https://help.qlik.com/en-US/stitch/replication/mongo-replication-keys) before you define the Replication Keys for your collections, as incorrectly defining Replication Keys can cause data discrepancies.

### Heavily nested data and destination column limits

MongoDB documents can contain heavily nested data, meaning an attribute can contain many other attributes.

If your destination doesn’t natively support nested data structures, Stitch will de-nest them to load them into the destination. Depending on how deeply nested the data is and the per table column limit of the destination, Stitch may encounter issues when loading heavily nested data.

Refer to the [Nested Data Structures guide](https://help.qlik.com/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures) for more info and examples.

## Troubleshooting

### Fields Missing from Replication Key Menu

If fields you expect to see are missing from a collection’s Replication Key menu, it may be that the fields aren’t indexed. Refer to the [Mongo Replication Keys guide](https://help.qlik.com/en-US/stitch/replication/mongo-replication-keys) for more info.