tencent cloud

TencentDB for MongoDB

Release Notes and Announcements
Release Notes
Announcements
User Guide
Product Introduction
Overview
Strengths
Use Cases
Cluster Architecture
Product Specifications
Features
Regions and AZs
Terms
Service Regions and Service Providers
Purchase Guide
Billing Overview
MongoDB Pricing
Billing Formula
Payment Overdue
Backup Space Billing
Configuration Adjustment Billing
Getting Started
Quickly Creating an Instance
Connecting to a TencentDB for MongoDB Instance
Reading/Writing Database
Operation Guide
Access Management
Instance Management
Node Management
Version Upgrade
Network Configuration
Monitoring
Backup and Rollback
Database Audit
Data Security
SSL Authentication
Log Management
Database Management
Multi-AZ Deployment
Disaster Recovery/Read-Only Instances
Parameter Configuration
Recycle Bin
Task Management
Performance Optimization
Data Migration Guide
Practical Tutorial
Optimizing Indexes to Break Through Read/Write Performance Bottlenecks
Troubleshooting Mongos Load Imbalance in Sharded Cluster
Considerations for Using Shard Clusters
Sample of Reading and Writing Data in MongoDB Instance
Methods for Importing and Exporting Data Based on CVM Connected with MongoDB
What to Do for Errors of Repeated Instance Creation and Deletion of Databases with the Same Names?
Troubleshooting MongoDB Connection Failures
Shard Removal Task: Guide for Confirming the Progress and Troubleshooting Issues
Performance Fine-Tuning
Ops and Development Guide
Development Specifications
Command Support in Sharded Cluster v3.2
Command Support in v3.6
Development Ops
Troubleshooting
Increased Slow Queries
Number of Connections Exceeding Limit
API Documentation
History
Introduction
API Category
Making API Requests
Instance APIs
Backup APIs
Account APIs
Other APIs
Task APIs
Introduction
Data Types
Error Codes
Instance Connection
Shell Connection Sample
PHP Connection Sample
Node.js Connection Sample
Java Connection Sample
Python Connection Sample
Python Read/Write Sample
Go Connection Sample
PHP Reconnection Sample
Product Performance
Test Environment
Test Method
Test Result
FAQs
Cost
Features
Sharded Cluster
Instance
Rollback and Backup
Connection
Data Migration
Others
Service Agreement
Service Level Agreement
Terms of Service
Glossary
Contact Us

Creating TencentDB for MongoDB Instance

PDF
Focus Mode
Font Size
Last updated: 2026-02-25 11:24:21

Overview

The TencentDB for MongoDB console offers a simple and easy-to-use operation method. You do not need to write code or run programs. Instead, you can directly use the service through the console. You can purchase and configure TencentDB for MongoDB instances to meet your business needs as described in this document.

Prerequisites

You have registered a Tencent Cloud account and completed identity verification.
Click here to register a Tencent Cloud account.
Click here to complete identity verification.
You have determined a region and AZ for the instance. For more information, see Regions and AZs.
You have determined the specification and performance requirements of the instance. For more information, see Product Specifications and Performance.
You have determined a VPC and security group for the instance. For more information, see Creating VPC and Configuring Security Group. Currently, access over the public network isn't supported.
You have checked out the billing details of the instance. For more information, see Billing Overview. Database fees for one hour will be frozen when you create a pay-as-you-go database. Make sure that your account balance is sufficient before making a purchase.
You have determined the business project of the instance. You can create a project in Project Management in the Account Center.
You have understood the differences between each database versions. For more information, see Storage Engine and Version.

Directions

1. Log in to the TencentDB for MongoDB purchase page with a Tencent Cloud account.
2. Specify instance configurations as needed. Required configuration items are as follows.
Parameter
Required
Description
Billing Modes
Yes
Pay-as-you-go is supported. For more information, see Billing Overview.
Region
Yes
Select a region where your instance resides. You should select a region closest to you to reduce access latency.
Note that the region cannot be changed after the instance is successfully created.
We recommend that you select the same region as the CVM instance for private network communication.
AZ
Yes
Enable Multi-AZ Deployment as needed. Multi-AZ deployment refers to deploying an instance across different AZs in the same region. Compared with single-AZ deployment, it has a higher availability and disaster recovery capability.
If your instance is deployed in the same AZ, select an AZ for the primary node from the drop-down list next to Primary Node.
If your instance is deployed across different AZs, select an AZ for the primary node from the drop-down list next to Primary Node and specify the AZ for each secondary node in each drop-down list next to Secondary Node n (n=1,2,3,4,5,6).
If the read-only node count is configured, configure the AZ for each read-only node.
After creating the instance, you can change the instance AZ.
Specification Type
Yes
Select the specification type for the database instance. For more information, see Cluster Architecture.
General Edition: A long-term stable database service, deployed on high-performance servers with ample bandwidth, where resources are isolated and allocated to different instances. It provides high-performance, high-reliability, and easy-to-manage MongoDB managed services.
Cloud Edition: A cloud-native architecture database service built on various cloud services such as CVM and CBS. It fully integrates Tencent Cloud’s underlying cloud service capabilities, allowing for quick adjustments to compute specifications and fast backup and restoration through cloud snapshots, providing greater flexibility and convenience for users.
Database Version
Yes
Select the database version. For details on how to choose a version, see Feature Details.
General Edition (High IO 10G Type): 8.0, 7.0, 6.0, 5.0, 4.4, 4.2, and 4.0.
Cloud Edition: 6.0, 5.0, 4.4, 4.2, and 4.0
After an instance is purchased, version upgrades are supported. For specific steps, see Version Upgrade.
Architecture Type
Yes
Select a system architecture for the instance cluster. Options: Replica Set and Sharded Cluster.
You need to understand the use cases of different architectures and select an appropriate one based on the actual data volume of your business. For more information, see System Architecture. Currently, architecture upgrade isn't supported.
Storage engine
Yes
The default storage engine is WiredTiger.
Mongod Specs
Yes
Select the computing specification of the instance from the drop-down list. The higher the specification, the higher the IOPS. For supported specifications, see Product Specifications.
After creating an instance, you can adjust its computing specification. For detailed directions, see Adjusting Instance Specification.
Mongod Shard Count
Yes
This parameter will be displayed if you select Sharded Cluster as the Architecture Type. It is used to set the mongod shard quantity in a sharded cluster instance, and its value range is [2,36]. Each shard is a replica set. The more the shards, the larger the cluster storage capacity. You can select a shard quantity as needed.
After creating an instance, you can adjust the mongod shard quantity. For detailed directions, see Adjusting Instance Specification.
Disk Capacity
Yes
Select the storage capacity of the instance on the slider.
The range of the disk capacity varies by mongod specification. For more information, see Product Specifications.
The default oplog storage space is 10% of the selected storage capacity. You can adjust the oplog capacity in the instance list in the console. For detailed directions, see Adjusting Oplog Capacity.
After creating an instance, you can adjust its disk capacity. For detailed directions, see Adjusting Instance Specification.
Primary and Secondary Nodes Count
Yes
This parameter will be displayed if you select Replica Set as the Architecture Type.
It is one-primary-two-secondary architecture with three storage nodes by default. Currently, you cannot customize the number of secondary nodes. You can select five (one-primary-four-secondary) or seven (one-primary-six-secondary) nodes from the drop-down list.
After creating the instance, you can add more secondary nodes per shard. For detailed directions, see Adding Secondary Node.
Primary and Secondary Nodes Count per shard
Yes
This parameter will be displayed if you select Sharded Cluster as the Architecture Type. It is used to set the number of nodes per shard in a sharded cluster instance.
The system adopts a one-primary-two-secondary architecture with three nodes by default, that is, each shard has three nodes in a one-primary-two-secondary architecture. You can select five (one-primary-four-secondary) or seven (one-primary-six-secondary) nodes from the drop-down list. Currently, you cannot customize the number of nodes.
After creating the instance, you can add more secondary nodes per shard. For detailed directions, see Adding Secondary Node.
Read-Only Node Count
Yes
The number of read-only nodes.
You can configure 0 or 1–5 read-only nodes.
Only versions 7.0, 6.0, 5.0, 4.0, 4.2, and 4.4 support configuring the number of read-only nodes; version 3.6 does not support this feature.
After creating the instance, you can add more read-only nodes. For detailed directions, see Adding Read-Only Node.
Specs Description
-
This parameter calculates the maximum number of connections to the instance based on the configured mongod specification to help you determine whether the current specification meets the expectation.
Mongos Specs
Yes
This parameter will be displayed if you select Sharded Cluster as the Architecture Type. It is used to configure mongos specification.
After you configure the mongod specification, the corresponding mongos specification will be selected by default. For example, if you select 2-core 4 GB MEM for mongod, the mongos specification will be configured as 1-core 2 GB MEM by default. After the mongos specification is upgraded, fees will be charged based on the new specification. For more information, see MongoDB Pricing.
The number of connections to the sharded cluster instance is subject to the selected mongos node specification and quantity. You can view the maximum number of connections of the instance in Specs Description.
After creating the instance, you can adjust the mongos specification. For detailed directions, see Adjusting Mongos Node Specification.
Mongos Nodes Count
Yes
This parameter will be displayed if you select Sharded Cluster as the Architecture Type. It is used to set mongos node quantity. If the instance is deployed in the same AZ, it can contain 3–32 mongos nodes. If you select Multi-AZ Deployment to deploy the instance across different AZs, the instance can contain 6–36 mongos nodes.
Adding more Mongos instances will result in additional charges. For more information, see MongoDB Pricing.
After creating the instance, you can adjust the mongos node quantity. For detailed directions, see Adding Mongos Node.
Network Type
-
Only VPC is supported.
IPv4 Network
Yes
Select a specific VPC and subnet.
You can use a CVM instance to connect to the automatically assigned private network address of a TencentDB instance. This method utilizes the high-speed private network of Tencent Cloud and features low delay. Note that both instances must be under the same account in the same VPC in the same region. For more information, see Connecting to TencentDB for MongoDB Instance.
VPCs are region-specific (e.g., Guangzhou), while subnets are AZ-specific (e.g., Guangzhou Zone 1). One VPC can be divided into one or multiple subnets, which are interconnected over the private network by default. Different VPCs are isolated over the private network by default, no matter whether they are in the same or different regions.
You can switch the VPC after instance purchase as instructed in Configuring Network.
You can also click Create VPCs and Create Subnets to create a required network environment. For detailed directions, see Creating VPC.
IPv6 Network
-
IPv6 address access is currently not supported in the current region and subnet.
Security Group
Yes
Set security group rules to control the inbound traffic to your database.
You can either select a security group from the Existing Security Groups drop-down list or click Custom Security Groups to create one and set new inbound rules. For more information, see Security Group.
Set Project
Yes
Assign your instance to a project for easy management.
Tags
No
Add tags to your instance for easy classification and management. Click Add to select tag keys and values.
Parameter Template
Yes
The parameter template ID. A parameter template is a collection of preset parameter values for MongoDB. A set of parameters and values with similar requirements can be saved as a template, which can then be directly applied to a new instance when creating it. The system automatically sets a default parameter template for each version. When you purchase an instance and select the database version, the corresponding default parameter template will be automatically selected. You can choose a newly defined parameter template from the drop-down list. For more information, see Creating Parameter Template.
Instance Name
Yes
Set the instance name. The default name is 500.
You can enter up to 60 letters, digits, hyphens, and underscores.
Set Password
Yes
Set the password authentication mode of the instance.
Password Authentication: You need to set an instance password for database access. For more information, see Connecting to TencentDB for MongoDB Instance.
Password-Free Access: You don't need to set a password. For more information, see Accessing Instance Without Authentication.
Password
No
This parameter will be displayed if you select Password Authentication. It is used to set the access password of the instance. Password requirements:
Minimum of 8 characters, maximum of 32 characters.
A combination of uppercase letters A-Z, lowercase letters a-z, and numbers 0-9.
Symbols: !@#%^*()_.
Do not use all letters or all numbers.
Confirm Password
No
Enter your password again.
Purchase Quantity
Yes
The maximum quota in pay-as-you-go mode in each region is 30.
Total Fees
Yes
Hourly fees will be displayed if you select Pay as You Go. For more information, see MongoDB Pricing.
3. After verifying that the parameters are correctly configured, click Buy Now. After the purchase success message is displayed, click Go to Console. After the instance's status becomes Running in the instance list, you can use it.

Related Operations

Use a CVM instance to directly access the private network address of the TencentDB instance. For more information, see Connecting to TencentDB for MongoDB Instance.
View the instance list and instance details. For more information, see Viewing Instance Details.

Related APIs

API Name
API Feature
Create a TencentDB instance (pay-as-you-go).

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback