When and why DynamoDB

When

  1. You are cost conscious. It is serverless so there is no per hour cost. Only storage and access cost (provisioned IOPS is additional or you may go for on-demand).
  2. ata doesn’t need to be searched by wild keys.
  3. Complex queries and lot of relations are not required.
  4. Data access can be represented as straight query from table (select * from my_table)
  5. You do not need analytics of data from DynamoDB
  6. Your data is huge and you know most of the access pattern.
  7. You are not looking to perform ACID compliant transactions (full transaction commit or full rollback). AWS DynamoDB supports transactions, however, we will not recommend that for DynamoDB.
  8. A record doesn’t need to have a unique id. We should just be able to find a record. Isn’t this interesting?

Why

  1. It is serverless so you don’t need to think about servers, deployment and upgrade.
  2. It has milliseconds response time (10+ ms which is true for other DBs as well). It can be made faster with DAX or other caching such as Elasticahe at additional cost.
  3. It is a multi-tenancy big database. Its design is similar to Cassandra.
  4. Automatic housekeeping by setting TTL for each record.
  5. It is an integral part of AWS stack

Considerations

  1. Partition size has to be less than 10 GB so you should design table such that table partitions increase in number with growth of data and Partitions should not be so sparse that you are not able to use built-in sorting per partition.
  2. DynamoDB can have 20 Global Secondary Index and 5 Local Secondary Index. This limit is good for most of the applications and even indexes can be made multi-key in one attribute.
  3. Creating complex indexes or relations may require DynamoDB streams which is additional cost. However, if tables are simple then this may not be required.

About VisionFirst Technologies Pvt. Ltd.

We are a group of researchers and practitioners of cutting edge technology. We are AWS Registered Partner. Our tech stack includes Machine Learning, offline/2G tolerant mobile apps, web applications, IOT and Analytics.

Add a Comment

Your email address will not be published.

Related Blogs