Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between AWS DynamoDB vs. AWS DocumentDB(Newly launched service)? [closed]

AWS recently launched new service DocumentDB similar to MongoDB interface.
What is the difference between AWS DynamoDB vs. DocumentDB services?

like image 201
Ajay yadav Avatar asked Feb 13 '19 03:02

Ajay yadav


People also ask

What is the difference between DynamoDB and DocumentDB?

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.

Which is faster DynamoDB or DocumentDB?

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.

What is AWS DocumentDB used for?

Amazon DocumentDB allows you to encrypt your databases using keys you create and control through AWS Key Management Service (KMS).

What is a difference between Amazon Relational Database Service RDS and DynamoDB?

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.


1 Answers

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

  1. 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.

  2. 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.

  1. In DynamoDB, you can create and use a so-called secondary index for similar purposes as in RDBMS. When you create a secondary index, you must specify its key attributes and after you create it, you can query it or scan it as you would a table. DynamoDB does not have a query optimizer, so a secondary index is only used when querying or scanning.

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.

  1. DynamoDB is popular in the gaming industry as well as in the internet of things (IoT) industry.

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.

like image 90
Casey Gibson - AOAUS Avatar answered Oct 05 '22 08:10

Casey Gibson - AOAUS