AWS recently launched new service DocumentDB similar to MongoDB interface.
What is the difference between AWS DynamoDB vs. DocumentDB services?
Among them, Amazon DocumentDB is a fully managed document database service that supports MongoDB workloads, and Amazon DynamoDB is a serverless key-value database that delivers single-digit millisecond performance at any scale.
Hence, DynamoDB can scale horizontally, making DynamoDB a more scalable service than DocumentDB. Furthermore, DynamoDB can store petabytes of data in a table with a 400KB per item constraint. But, DocumentDB has a maximum storage limit of 64 TiB (tebibyte) for the database.
Amazon DocumentDB allows you to encrypt your databases using keys you create and control through AWS Key Management Service (KMS).
The significant difference between these two services is that Amazon RDS is relational, whereas DynamoDB is a NoSQL database engine. In terms of storage size, DynamoDB stands out with its ability to support tables of any size. But with RDS, the storage size changes based on the database engine we use.
A major difference is that DocumentDB is a middle step between MongoDB and DynamoDB.
DynamoDB is a fully managed scalable service where you set the upper limit of it's potential.
DocumentDB is a bit more hands on and you have to select the number of instances for the cluster and the instance sizes. This means you would need to keep an eye on their usage / performance but not to the extend of MongoDB.
MongoDB would be the most flexible but also require the most maintenance.
All are good for performance depending on the application, but it depends on how flexible you want with the cost of more maintenance.
The other factor is the pricing model. Both MongoDB (Atlas) and DocumentDB you pay per hour (plus usage for DocumentDB). DynamoDB you can pay based on provisioned resources or on-demand (pay for what you use).
Edit: I've written a more extensive article based on my experiences with the three: https://medium.com/@caseygibson_42696/difference-between-aws-dynamodb-vs-aws-documentdb-vs-mongodb-9cb026a94767
Some Key differences
Amazon DynamoDB is a fully managed NoSQL database service. It provides fast and predictable performance with scalability. You can use Amazon DynamoDB to create a database table that can store and retrieve any amount of data, and serve any level of request traffic. Document DB is based upon an open-source document database Mongo DB and leading NoSQL database .Document DB is based upon open-source Mongo DB and is a document database designed for less of development and scaling.
DynamoDB uses tables, items and attributes as the core components that you work with. A table is a collection of items, and each item is a collection of attributes. DynamoDB uses primary keys to uniquely identify each item in a table and secondary indexes to provide more querying flexibility.
MongoDB / Document DB uses JSON-like documents to store schema-free data. In Document DB, collections of documents do not require a predefined structure and columns can vary for different documents. Document DB has many features of a relational database, including an expressive query language and strong consistency. Since it is schema-free, MongoDB/Document DB allows you to create documents without having to create the structure for the document first.
Indexes are preferred in MongoDB/Document DB. If an index is missing, every document within the collection must be searched to select the documents requested by the query. This can slow down read times.
To summarize, Document DB can be a good choice if you need scalability and caching for real-time analytics; however, it is not built for transactional data (accounting systems, etc.). Document DB can used for mobile apps, content management, real-time analytics and applications for IoT. If you have a case with no clear schema definition, DocumentDB can be a good choice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With