Amazon DynamoDB

DynamoDB is an Amazon service which differs from other their services by allowing developers to purchase a service based on throughput, rather than storage. Although the database does not automatically scale, administrators can request more throughput and DynamoDB will spread the data and traffic over a number of servers using solid-state drives, predictable performance. Moreover, it offers integration with Hadoop via Elastic MapReduce.

DynamoDB pros:

Scalable. There is no limit to the amount of data, and the service automatically allocate more storage.

Flexible. Each data item may have different number of attributes. Multiple data types (strings, numbers, binary, and sets).

Distributed. DynamoDB scales horizontally and seamlessly scales a single table over hundreds of servers.

Cost effective. Allows more than 40 million database operations/month and pricing is based on throughput.

Dynamo is scalable NoSQL solution from AWS. However, not everybody knows how to utilize it at its best in order to make profit for their business.

In this post we try to look at pros and cons in comparison with other solutions and find use cases where DynamoDB works at its best.

So in NoSQL world there are particular requirements for dbs.

It has to accept and store massive amounts of data.

Scalability is a prior requirement. RDBMS is very hard to scale horizontally and there is particular point in time when it’s just reaching the limit. NoSQL in comparison is designed for horizontal scaling and could be scaled endlessly.

No relations, so query could be speeded up. However, because NoSQL means there is no ability to create complicated queries.

Also nobody can stop you from using RDBMS and NoSQL at the same time within the same app.

Why DynamoDB is good:

It has predictable speeds. Simply you just have to define throughput and use it. Expecting 100r/s just add more and you’re ready to go.

It is hosted on AWS premises and hence acting as a web service. For you that means you absolutely avoidу having administration headache. No more fleets of instances with Mongo master/slave nodes. No more complicated administration hell with load-balancers.

RedShift integration. That means you can export your DynamoDB table into Redshift and run complicated queries for data analytics.

Build-in CloudWatch monitoring. So you can watch your table performance in close to real time. This is a bit tricky and we should cover this in our next post about dynamo speed checking and speedometers.

So, if you decided to select this option, you could use AWS web-console or CLI. But these two are only good for monitoring tables. The ultimate tool is DynamoDB libraries. It gives you full access to all Dynamo features and most important part of it that you will be able to make Dynamo as part of your application through the code.

Below there are few code snippets which will give you understanding how to: