ApsaraDB for MongoDB supports three instance architectures: standalone, replica set, and sharded cluster. Each architecture has a distinct set of capabilities and constraints. Review the limits for each architecture before selecting an instance type.
Feature comparison by instance type
The following table summarizes the key feature differences across instance types to help you choose the right architecture.
| Feature | Standalone | Replica set | Sharded cluster |
|---|---|---|---|
| High availability | Not supported | Supported | Supported |
| Snapshot Backup | Supported | MongoDB 4.4 and later | Not supported |
| Physical Backup / Logical Backup | Not supported | MongoDB 3.4–4.2 | Supported |
| Point-in-time restoration | Not supported | — | Supported |
| SSL encryption | Not supported | Supported | Not supported |
| Transparent data encryption (TDE) | Not supported | MongoDB 4.2 and earlier | Supported |
| Audit log | Not supported | Supported | Supported |
| Whitelist | Supported | Supported | Supported |
| CloudDBA (full) | Partial | Supported | Not supported for DynamoDB-compatible instances |
| Incremental data sync | Not supported | Supported | — |
Standalone instance
Standalone instances lack high availability, point-in-time recovery, and several security features available in replica set and sharded cluster instances.
Deployment and engine version
| Item | Limit |
|---|---|
| Supported regions and zones | Deployable only in specific regions and zones. See Available regions and zones. |
| Engine version | MongoDB 3.4 and 4.0 only. MongoDB 3.4 instances have been unavailable since January 1, 2023. See [Notice] End of sale for MongoDB 3.4 instances as of January 1, 2023. |
Connectivity
Encryption features cannot be enabled or disabled for internal network connections.
Backup and restoration
| Item | Limit |
|---|---|
| Backup | Snapshot Backup only. A snapshot is a point-in-time backup of disk data. |
| Restoration | Restoration to a new instance by backup point only. Point-in-time restoration is not supported. See Restore backup data to a new instance by backup point. |
Service availability
High availability is not supported. This includes primary/secondary switchover, role switching, and cross-zone instance migration. If your workload requires high availability, use a replica set instance instead.
Security
Only virtual private cloud (VPC) is supported for network access. To create a VPC, see Create and manage a VPC.
| Feature | Standalone instance |
|---|---|
| Whitelist | Supported. See Configure a whitelist for an instance. |
| SSL | Not supported |
| TDE | Not supported |
| Audit logging | Not supported |
If your workload requires SSL, TDE, or audit logging, use a replica set instance instead.
Diagnostics and logging
| Feature | Standalone instance |
|---|---|
| Slow Query Logs | Not supported |
| Error Logs | Not supported |
| Running Logs | Not supported |
| CloudDBA Performance Trends | Supported |
| CloudDBA Real-time Performance | Not supported |
| CloudDBA Sessions | Not supported |
| CloudDBA Storage Analysis | Not supported |
Data migration
The following migration paths are supported for standalone instances.
From self-managed MongoDB:
Between ApsaraDB for MongoDB instances:
Migrate data from a standalone instance to a replica set or sharded cluster instance
Migrate data between ApsaraDB for MongoDB instances of different Alibaba Cloud accounts
Incremental data migration and synchronization are not supported for standalone instances. If your workload requires incremental migration or real-time synchronization, use a replica set instance instead.
Replica set instance
Replica set instances support high availability, multiple backup types, and a full set of security and diagnostic features.
Deployment
Replica set instances are deployable only in specific regions and zones. See Available regions and zones.
Engine version management
When a minor version expires or is no longer maintained, ApsaraDB for MongoDB automatically updates the instance to the latest minor version during the following operations: version upgrade, data migration, configuration change, and data restoration.
Connectivity
Replica set instances running MongoDB 4.4 and later do not support switching the network type from classic network to VPC.
Data backup
| MongoDB version | Supported backup types |
|---|---|
| 3.4, 4.0, 4.2 | Physical Backup and Logical Backup |
| 4.4 and later | Snapshot Backup (a point-in-time backup of disk data) |
For instances running MongoDB 3.4, the total number of collections and indexes must not exceed 10,000. Exceeding this limit may cause physical backup to fail. To avoid this, upgrade to MongoDB 4.0 or 4.2. See Upgrade the major version of an instance.
Security
| Feature | Replica set instance |
|---|---|
| Whitelist | Supported. See Configure a whitelist for an instance. |
| SSL | Supported. See Configure SSL encryption for an instance. |
| TDE | MongoDB 4.2 and earlier only. See Configure TDE for an instance. |
| Audit log | Supported. See Enable the audit log feature. |
TDE is available only for instances running MongoDB 4.2 and earlier. Instances running MongoDB 4.4 and later do not support TDE.
Diagnostics and logging
No restrictions. All log management and CloudDBA features are available.
Data migration
The following migration paths are supported for replica set instances.
From self-managed MongoDB:
From a third-party cloud:
Migrate data from an Amazon DynamoDB database to ApsaraDB for MongoDB by using NimoShake
Migrate data from a MongoDB Atlas database to ApsaraDB for MongoDB by using DTS
Between ApsaraDB for MongoDB instances:
Migrate data from a replica set instance to a sharded cluster instance
Migrate data between ApsaraDB for MongoDB instances of different Alibaba Cloud accounts
Export to self-managed MongoDB:
Data synchronization
Sharded cluster instance
Sharded cluster instances are designed for large-scale, high-throughput workloads. Some features available in replica set instances are not supported.
Deployment
Sharded cluster instances are deployable only in specific regions and zones. See Available regions and zones.
Engine version management
When a minor version expires or is no longer maintained, ApsaraDB for MongoDB automatically updates the instance to the latest minor version during the following operations: version upgrade, data migration, configuration change, and data restoration.
Data reads and writes
The admin database is read-only in sharded cluster instances. Writing to the admin database is not supported.
Backup and restoration
| Item | Limit |
|---|---|
| Backup | Physical Backup and Logical Backup |
| Restoration | Point-in-time restoration to a new instance only. See Restore backup data to a new instance by point in time. |
| Recycle bin | Not supported |
Security
| Feature | Sharded cluster instance |
|---|---|
| Whitelist | Supported. See Configure a whitelist for an instance. |
| TDE | Supported. See Configure TDE for an instance. |
| Audit log | Supported. See Enable the audit log feature. |
| SSL | Not supported. If your workload requires SSL encryption, use a replica set instance instead. |
DynamoDB-compatible sharded cluster instances support only VPC for network access. To create a VPC, see Create and manage a VPC.
Diagnostics
CloudDBA is not supported for DynamoDB-compatible sharded cluster instances. The affected features include Performance, Real-time Performance, Sessions, Storage Analysis, and Slow Query Logs.
Data migration
The following migration paths are supported for sharded cluster instances.
From self-managed MongoDB:
From a third-party cloud:
Migrate data from an Amazon DynamoDB database to ApsaraDB for MongoDB by using NimoShake
Migrate data from a MongoDB Atlas database to ApsaraDB for MongoDB by using DTS
Between ApsaraDB for MongoDB instances: