All Products
Search
Document Center

PolarDB:Comparison with self-managed MongoDB

Last Updated:Oct 10, 2026

This topic compares self-managed MongoDB with the PolarDB for MySQL document database (compatible with the MongoDB protocol) capability. The comparison covers dimensions such as architecture and deployment, availability and reliability, and elasticity and scaling to help you choose the right solution.

Background and positioning

Self-managed MongoDB refers to MongoDB databases that you manually install, configure, and maintain on your own servers or cloud instances. This approach gives you full control over database instances. However, you must also handle all O&M work, including installation and deployment, version upgrades, backup and recovery, high availability architecture setup, and monitoring and security systems. These tasks place high demands on the technical skills of your O&M team.

PolarDB for MySQL document database (compatible with the MongoDB protocol) capability is built on the MySQL 8.0.2 kernel and provides a fully managed document database service. You get MongoDB protocol compatibility without managing the underlying infrastructure. Protocol conversion is handled at the database proxy layer and is decoupled from the kernel, so you can reuse the enterprise-grade capabilities of PolarDB, such as connection pooling, load balancing, read/write splitting, high availability, elastic scaling, and backup and recovery. Compute nodes use a shared storage architecture with one primary node and multiple read-only nodes, and storage capacity scales automatically on demand. You can manage data through collections without creating tables or defining schemas, just as you would with MongoDB. You can also use standard SQL to run complex join queries and analysis on the same data.

Architecture and deployment

Dimension

Self-managed MongoDB

PolarDB document database (compatible with the MongoDB protocol)

Deployment and O&M

You must manually install MongoDB and configure replica sets or sharded clusters. O&M costs are high.

Fully managed service. You can create a cluster in the console with a single click, and initialization and configuration complete automatically.

Storage and compute

Storage and compute are bound to the same node, so you must scale both at the same time.

Compute-storage separation architecture. Compute nodes and storage capacity scale independently and elastically.

High availability

You must set up replica sets to achieve high availability. Failover depends on manual configuration or third-party tools.

An architecture with one primary node and multiple read-only nodes. High availability is enabled by default and requires no additional configuration.

Driver compatibility

Natively supports all official MongoDB drivers and ecosystem tools.

Compatible with the MongoDB protocol. Supports mainstream MongoDB drivers and ecosystem tools such as mongosh. For more information, see Drivers and ecosystem tools.

Availability and reliability

Dimension

Self-managed MongoDB

PolarDB document database (compatible with the MongoDB protocol)

Multi-region and multi-zone disaster recovery

You must manually deploy replica set members across zones. The configuration is complex, and you must optimize network latency yourself.

Supports multi-region and multi-zone deployment. The cloud platform provides disaster recovery. For more information, see What Is Global Database Network (GDN).

Backup

You must write your own backup scripts or use tools such as mongodump, and you must manually maintain backup policies and storage management.

Provides automatic backup, including full backups and incremental backups. You can configure backup policies in the console. For more information, see Manage backups.

Recovery

Recovery relies on manual backup files. Point-in-time recovery to a specific timestamp is not supported.

Supports point-in-time recovery (PITR) to restore data to a specific second-level timestamp. For more information, see Cluster recovery: Point-in-time recovery (PITR).

Storage reliability

Depends on the underlying storage media. You usually must configure RAID or distributed storage yourself to ensure data reliability.

Distributed storage with multiple replicas. The storage layer ensures data reliability.

Elasticity and scaling

Dimension

Self-managed MongoDB

PolarDB document database (compatible with the MongoDB protocol)

Read scaling

You scale read capacity by adding secondary nodes, but you must manually configure the read/write splitting logic.

Supports adding read-only nodes and provides a built-in read/write splitting proxy. Read requests are distributed to read-only nodes without application changes.

Storage scaling

Storage expansion requires downtime or complex online expansion operations, which may cause service interruptions.

Storage capacity scales automatically on demand. No pre-allocation is required.

Elastic scaling

Elastic scaling requires external monitoring systems and custom scripts, resulting in slow response times.

Supports Serverless elastic scaling. Compute resources adjust automatically based on your workload, and you are billed on a pay-as-you-go basis. For more information, see Enable serverless for fixed-specification clusters.

Independent compute and storage scaling

Not supported. Compute and storage are bound to the same node and must be scaled at the same time.

Compute nodes and storage capacity are fully decoupled and can be scaled independently on demand without affecting each other.

Summary

Compared with self-managed MongoDB, the PolarDB for MySQL document database (compatible with the MongoDB protocol) capability provides the following core advantages:

  • Maintenance-free: a fully managed service that eliminates the need for infrastructure O&M, version upgrades, and patch installation.

  • High availability: an architecture with one primary node and multiple read-only nodes delivers high availability by default, along with automatic failover, automatic backup, and point-in-time recovery.

  • Elastic scaling: the compute-storage separation architecture supports independent scaling. The Serverless capability automatically adjusts resources based on load.

  • Protocol compatibility: compatible with the MongoDB protocol, so mainstream drivers and ecosystem tools integrate seamlessly.

  • Multi-region and multi-zone disaster recovery: supports What Is Global Database Network (GDN) for cross-region, low-latency access.

To migrate from self-managed MongoDB to the PolarDB for MySQL document database capability compatible with the MongoDB protocol, see Migrate data from MongoDB to document database (MongoDB-compatible).