ApsaraDB for MongoDB, Where We Are and Where We Are Going

By Cen Zheng, Alibaba Cloud Intelligence


History of ApsaraDB for MongoDB

A glance at ApsaraDB for MongoDB

Instance type

For replica set, a 3 nodes cluster with Primary/Secondary/Hidden was deployed typically. This ensures high availability for MongoDB service by default. Cross availability-zone deployment was available for those regions who has 3 availability-zones. If higher availability was required, more electable nodes, like 5 or 7, can be employed. Also, additional read-only nodes can be added to scale read requests, up to 5. On the contrary, there exists a standalone instance type for those business who does not have high availability requirements.

A sharded cluster is made of multiple shards, each one is also a 3 nodes replica set. A sharded cluster is able to scale horizontally by adding shards. Each shard has its own cluster tier, and is able to scale vertically alone.

Serverless is a new instance type provided by Alibaba Cloud aiming at making the usage threshold of MongoDB service even lower. More details will be covered later.

MongoDB versions


ApsaraDB for MongoDB provides end-to-end security solution from VPC network isolation, IP whitelist access control, Auditing, Transport Encryption and Encryption at Rest.

Alibaba Cloud also provides variety database ecosystem service and tools. Data Transmission Service helps you migrate and sync data between instances. A corresponding open src tool called MongoShake is also available on the GitHub. Data Management is a visualized data management platform. Database Backup is a secure and cost-efficient solution for continuous data protection. Database Autonomy Service (DAS) is a cloud service that implements self-perception, self-repair, self-optimization, self-O&M, and self-security of databases based on machine learning and expert experience. Currently, DAS’s most significant features around MongoDB is index recommendation driven by an external cost-based diagnosis engine. Last but not the least, in Alibaba Cloud, there are several experienced MongoDB experts not only in maintenance but also very familiar with MongoDB internals.

New features general available on ApsaraDB for MongoDB

MongoDB 4.4

Cloud Disk Storage Type


DynamoDB Compatibility

Almost all data types and APIs including control plane and data plane are compatible. For example, Local/Global Secondary Indexes, Conditional Writes, ReturnValues, Projections, ParallelScan and so on, are all implemented. More compatibility features like Streams are upcoming.

Ok, so why migrating from DynamoDB? Some tests have been performed comparing the performance and price between ApsaraDB for MongoDB and DynamoDB. To sum up, a typical chosen MongoDB sharded cluster tier is 50% cheaper than DynamoDB, but providing 3 times higher performance. This could be a huge TCO reduction.


Alibaba Tech

First hand and in-depth information about Alibaba’s latest technology → Facebook: “Alibaba Tech”. Twitter: “AlibabaTech”.

First-hand & in-depth information about Alibaba's tech innovation in Artificial Intelligence, Big Data & Computer Engineering. Follow us on Facebook!