If you use a self-managed MongoDB database as the source or destination database in a data synchronization or migration task configured in the Data Transmission Service (DTS) console, you can specify multiple endpoints for the MongoDB database to enhance the stability of data synchronization or migration.
Prerequisites
The CIDR blocks of DTS servers are added to the IP address whitelist of the self-managed MongoDB database to allow DTS to access the database. For more information, see Add the CIDR blocks of DTS servers.
The endpoints of multiple nodes of the self-managed MongoDB database are obtained and can be connected.
NoteYou must obtain the endpoints of multiple shard nodes only if the source database is a self-managed MongoDB database that uses the sharded cluster architecture.
Usage notes
You can specify multiple endpoints for the source or destination MongoDB database in a DTS task only on the new version of the task configuration page.
You can specify multiple endpoints for the source or destination MongoDB database only if you set the Access Method parameter to Express Connect, VPN Gateway, or Smart Access Gateway, Public IP Address, or Cloud Enterprise Network (CEN).
Procedure
Go to the Data Synchronization Tasks or Data Migration Tasks page.
Log on to the DTS console.
In the left-side navigation pane, click Data Synchronization or Data Migration.
On the top navigation bar, select the region in which a data synchronization or migration task resides.
Click Create Task to go to the task configuration page.
Configure the parameters for the source or destination database.
The following table describes the parameters. You can configure other parameters based on your business requirements.
Parameter
Description
Database Type
Select MongoDB.
Access Method
Select Express Connect, VPN Gateway, or Smart Access Gateway, Cloud Enterprise Network (CEN), or Public IP Address.
Architecture
Select Replica Set or Sharded Cluster.
Endpoint Type
Select Multi-node.
Endpoint
Enter the endpoints of the self-managed MongoDB database or a mongos node.
NoteIf you set the Architecture parameter to Replica Set, specify the Endpoint parameter. If you set the Architecture parameter to Sharded Cluster, specify the Mongos endpoint parameter.
An endpoint is in the
<IP>:<Port>
format. Replace<IP>
with a domain name or an IP address. We recommend that you use a domain name that is publicly resolvable.Separate multiple endpoints with line feeds.
Mongos endpoint
Access to Multiple Shard Nodes
The information that is used to access the shard nodes of the self-managed MongoDB database.
NoteThis parameter is available only if the self-managed MongoDB database is the source database, the Architecture parameter is set to Sharded Cluster, the Migration Method parameter is set to Oplog and the Endpoint Type parameter is set to Multi-node.
Click Add to the right of Access to Multiple Shard Nodes.
In the Shard Node Endpoint field, enter the endpoint of a shard node of the self-managed MongoDB database.
NoteIf you set the Architecture parameter to Replica Set, specify the Endpoint parameter. If you set the Architecture parameter to Sharded Cluster, specify the Mongos endpoint parameter.
An endpoint is in the
<IP>:<Port>
format. Replace<IP>
with a domain name or an IP address. We recommend that you use a domain name that is publicly resolvable.Separate multiple endpoints with line feeds.
Repeat the preceding steps to configure the access information for each shard node.
Perform the subsequent operations based on your business requirements.
For more information, see Synchronize data from a MongoDB database or Migrate data from a MongoDB database.