Amazon DocumentDB is a fully managed, scalable, and highly available database service designed to be compatible with MongoDB. It is a NoSQL database service designed for storing and managing semi-structured data in a JSON-like format. DocumentDB is ideal for use cases that require flexible, schema-less data storage, such as content management systems, catalogs, mobile applications, and real-time analytics.
MongoDB Compatibility:
Amazon DocumentDB is compatible with MongoDB APIs, which means that applications written for MongoDB can interact with DocumentDB with minimal changes. You can use MongoDB drivers and tools (like mongo-shell
, mongodump
, mongorestore
, and mongos
) with Amazon DocumentDB.
Note: While DocumentDB is compatible with MongoDB 3.6 and 4.0 APIs, there may be minor differences in features or behaviors compared to the original MongoDB engine, particularly for newer MongoDB versions.
Fully Managed:
Automated backups: DocumentDB performs daily backups of your data without application impact, and you can retain backups for up to 35 days.
Automated patching: AWS handles updates to the underlying infrastructure and software, so there’s no need for manual patching.
Monitoring: Integration with Amazon CloudWatch allows for continuous monitoring of metrics such as CPU usage, memory, disk space, and latency.
Scalability:
Horizontal Scaling: DocumentDB supports read replicas that allow you to scale read operations across multiple replicas.
Storage Scaling: The database automatically scales storage without manual intervention, meaning your storage needs grow with your data volume.
Compute Scaling: You can adjust the compute capacity of your DocumentDB cluster, either scaling up or down based on your performance requirements.
High Availability and Durability:
Amazon DocumentDB is designed to provide high availability and fault tolerance. It replicates data across multiple Availability Zones (AZs) within an AWS region.
Data is automatically replicated to three separate copies across three AZs, ensuring durability and quick recovery in case of failure.
Security:
Encryption at rest: Data in DocumentDB is automatically encrypted at rest using AWS KMS (Key Management Service).
Encryption in transit: Supports TLS encryption to ensure that data is securely transmitted between clients and the database.
Access Control: Integration with AWS Identity and Access Management (IAM) enables fine-grained access control to your Amazon DocumentDB resources.
VPC Support: You can deploy Amazon DocumentDB within an Amazon VPC to isolate your database and control network access using security groups and VPC peering.
Document-Oriented Data Model:
Amazon DocumentDB stores data as JSON documents, which can have nested structures (arrays, objects, etc.), making it ideal for semi-structured and unstructured data.
It supports rich queries on documents, including complex aggregations and full-text search capabilities.
Indexes:
You can create custom indexes in DocumentDB to optimize query performance. This includes support for compound indexes, geospatial indexes, and text indexes.
Global Replication:
Amazon DocumentDB provides global replication (via cross-region replication) to enable read-write access to databases across multiple regions for disaster recovery and geo-distributed applications.