What is ApsaraDB for MongoDB (Serverless)?

Updated at:

This topic describes the architecture, implementation, and application scenarios of ApsaraDB for MongoDB Serverless. This information helps you understand the product and determine whether it meets your business needs.

Important ApsaraDB for MongoDB stopped offering new purchases of Serverless (preset capacity) instances on July 11, 2022. For more information, see [Notice] ApsaraDB for MongoDB stops offering new purchases of Serverless (preset capacity) instances.

Product definition

ApsaraDB for MongoDB Serverless is a database service from Alibaba Cloud designed for small businesses and individual developers. It provides vertical resource isolation for proxies, network resources, namespaces, and storage space. It also offers on-demand billing for compute resources. The service is easy to use, flexible, and cost-effective, with low resource usage. It addresses the high entry barrier of standard MongoDB, which is often geared towards larger users, and makes it easier for small and medium-sized customers to adopt a cloud-based database.

Read/write throughput CUs

The service capacity of ApsaraDB for MongoDB Serverless is measured by read/write throughput. Throughput is measured in read capacity units and write capacity units, also known as capacity units (CUs). A CU is the smallest unit for a data read or write operation. When you perform read or write operations on the database of an ApsaraDB for MongoDB Serverless instance, you consume the corresponding read CUs and write CUs.
  • One read CU is consumed for every 4 KB of data read from a data table.
  • One write CU is consumed for every 1 KB of data written to a data table.
  • The data size of an operation is rounded up to the nearest whole unit.

    For example, writing 7.6 KB of data consumes 8 write CUs, and reading 0.1 KB of data consumes 1 read CU.

  • You can select the compute specifications (100 to 8,000 CUs in 100 CU increments) and storage space (1 GB to 100 GB in 1 GB increments) for your ApsaraDB for MongoDB Serverless instance as needed.
    Note A specification of 100 CUs means that 100 read CUs or write CUs can be consumed per second. Traffic is throttled if it exceeds the specification limit. To handle traffic bursts, the Serverless edition provides a burst capability. This allows your services to use more CUs than the specified limit for short periods.

Architecture

Architecture

After you create an ApsaraDB for MongoDB Serverless instance, the system automatically provisions a virtual IP address (VIP) in a virtual private cloud (VPC). The system then uses this VIP to randomly attach two Mongos nodes from the proxy resource pool. Your service connects to one of the Mongos nodes. If that node fails and becomes inaccessible, the system automatically switches the service to the other Mongos node. The failed node is automatically repaired and then held in standby to ensure high availability.

In ApsaraDB for MongoDB Serverless, Mongos nodes use a combination of a tenant ID and a namespace to achieve logical data isolation.

Differences from ApsaraDB for MongoDB

ApsaraDB for MongoDB Serverless is built on an ApsaraDB for MongoDB sharded cluster. The following table compares ApsaraDB for MongoDB Serverless with the General-purpose and Exclusive editions of ApsaraDB for MongoDB.

ItemMongoDB General-purpose/ExclusiveMongoDB Serverless
Network type
  • Classic network
  • VPC
VPC
Database version
  • 3.4
  • 4.0
  • 4.2
  • 4.4
  • 5.0
4.2
Maximum connections500 to 100,00050
Maximum IOPS8,000 to 100,000Not applicable
Storage capacity10 GB to 2 TB1 GB to 100 GB
Service availabilitySupportedNot supported
Backup and restorationSupported in the consoleUse the mongodump and mongorestore tools. For more information, see Back up a self-managed database.
Instance monitoringSupportedSupported
Security management
  • Whitelist settings
  • You can configure security groups.
  • Supports link encryption.
  • Provides data storage encryption.
  • Support for Bring-Your-Own-Key (BYOK).
  • Whitelist settings
  • Security group settings
Account managementManage database accounts in the following ways:The default account is provided and its password is modifiable.
Log management
  • Supports slow query logs.
  • Support for audit logs.
  • Operation logs
Not supported
Auto scalingSupports manual scaling in the console.Supports manual scaling in the console.
ArchitectureA dedicated clusterMultiple tenants share a cluster. The combination of tenant IDs and namespaces is used to isolate resources.
Connect to an instanceConnect to an instance in the following ways:
  • Connect to an instance using Data Management (DMS).
  • Connect to an instance using the mongo shell.
  • Connect to an instance using code.

User scenarios

ApsaraDB for MongoDB Serverless is suitable for the following scenarios:
  • Users with small or lightweight workloads: ApsaraDB for MongoDB Serverless is suitable for small and medium-sized customers who need a ready-to-use service. For short-term use, the cost can be less than 10% of a traditional deployment. Instances can be started and destroyed in seconds, which provides great flexibility for your applications.
  • Users who want a fully managed service: The service is supported by an experienced Alibaba Cloud operations and maintenance (O&M) team that professionally maintains, upgrades, optimizes, and troubleshoots instances. This provides a fully managed service with an efficient and stable backend, which is ideal for small and medium-sized companies.

References

Limits of Serverless instances