Amazon DynamoDB: Things You Should Know!

Yash Bindlish
5 min readApr 25, 2020

--

Business applications today receive massive amount of data due to the growth of users with the increasing complexity of data traffic. In order to keep the business growing and meeting the customer demand, enterprises are continuously eyeing on a grouping scalability, performance and operational efficiency together in order to manage the increase Data complexities.

Along with the modern complexities of business comes the need to process the data faster and more robustly. Because of this, Traditional transaction databases aren’t the best fit.

Amazon DynamoDB is a non-relational database service from AWS.

DynamoDB have been designed to manage the new influx of data. DynamoDB supports data structures and key — valued cloud services. It empowers enterprises to leverage capabilities such as auto-scaling, in-memory caching, backup and restore options, data streaming and many more. It is a managed service offering from Amazon Web Services which supports organizations to keep their focus on code and remain unstressed for managing the database.

Components of DynamoDB

DynamoDB comprises of three components known as table, attribute, and items. A table holds a set of items, an attribute is the simplest element that stores data without any further division and item holds a set of attributes.

DynamoDB Components

Key DynamoDB Architecture Pillars:

· Amazon DynamoDB Indexes: There are two types of indexes in DynamoDB, a Local Secondary Index (LSI) and a Global Secondary Index (GSI). In an LSI, a range key is mandatory, while for a GSI you can have either a hash key or a hash+range key. GSIs span multiple partitions and are placed in separate tables. DynamoDB supports up to five GSIs. While creating a GSI, you need to carefully choose your hash key because that key will be used for partitioning.

Which is the right index type to use? Here are two considerations: LSIs limit item size to 10 GB, and GSIs offer only eventual consistency.

Local Secondary Indexes: There are instances where application needs to access an alternate Sort key rather than your base table’s primary key. To give your application a choice of sort keys, you can create one or more local secondary indexes on an Amazon DynamoDB table and issue Query or Scan requests against these indexes.

DynamoDB — Local Secondary Index (LSI)

Global Secondary Indexes: Applications requiring various query types with different attributes can use a single or multiple global secondary indexes in performing these detailed queries. Global secondary indexes accelerate queries by organizing a selection of attributes from a table. They employ primary keys in sorting data, and require no key table attributes, or key schema identical to the table.

All the global secondary indexes must include a partition key, with the option of a sort key. The index key schema can differ from the table, and index key attributes can use any top-level string, number, or binary table attributes.

In a projection, you can use other table attributes, however, queries do not retrieve from parent tables.

Dynamo DB — Global Secondary Index (GSI)

Dynamo Streams: DynamoDB Streams makes change data capture from database available on an event stream. One of the use cases for processing DynamoDB streams is to index the data in ElasticSearch for full text search or doing analytics.

DynamoDB Streams

· Amazon DynamoDB DAX: Amazon DynamoDB Accelerator (DAX) is a fully managed, highly available, in-memory cache for DynamoDB that delivers up to a 10x performance improvement — from milliseconds to microseconds — even at millions of requests per second. DAX does all the heavy lifting required to add in-memory acceleration to your DynamoDB tables, without requiring developers to manage cache invalidation, data population, or cluster management. Now you can focus on building great applications for your customers without worrying about performance at scale. You do not need to modify application logic, since DAX is compatible with existing DynamoDB API calls. You can enable DAX with just a few clicks in the AWS Management Console or using the AWS SDK. Just as with DynamoDB, you only pay for the capacity you provision.

DynamoDB DAX

· Amazon DynamoDB Auto-Scaling: Organizations should leverage the DynamoDB Auto scaling capabilities understand the usage pattern and take a smartest decision to scale in or scale out your DynamoDB.

DynamoDB Auto-Scaling

DynamoDB uses a scaling policy in Application Auto Scaling. You can set minimum and maximum levels of reads and write capacity in addition to the target utilization percentage. Auto scaling as a standard pattern uses Cloud Watch to monitor table’s read and write capacity metrics (ConsumedReadCapacityUnits ,ConsumedWriteCapacityUnits) and track consumed capacity. The upper threshold alarm is triggered when consumed reads or writes breach the target utilization percent for two consecutive minutes.

Why DynamoDB?

Why DynamoDB is also a very important aspect for enterprises to evaluate before starting their implementation and come up with the business case to understand if they will be meeting and accounting all the benefits which DynamoDB brings today. Any hasty decision will result into a failure for an organization and rework.

I just created a simple decision tree that guides you through why DynamoDB.

Dynamo DB Decision Tree

Conclusion:

DynamoDB is a reliable system that helps small, medium and large enterprises scale their applications.

It comes with options to backup, restore and secure data, and is great for both mobile and web apps. With the exception of special services like financial transactions and healthcare, you can redesign almost any application with DynamoDB. This non-relational database is extremely convenient to build event-driven architecture and user-friendly applications.

Organizations should evaluate their needs from time to time basis and during their application modernization phase to consider the non-relational database such as DynamoDB to be re-architected in their application modernization plan. As the kind of benefits which are linked with DynamoDB are massive and organizations should not miss out any of them.

--

--

Yash Bindlish
Yash Bindlish

Written by Yash Bindlish

Principal Solution Architect with over 14 years of extensive IT Architecture who share the enthusiasm for exploiting technology to create business value.

No responses yet