Amazon DynamoDB is a fully-managed (“serverless”) and NoSQL (nonrelational) database service, available on Amazon Web Services. DynamoDB is highly scalable, meaning you can start really small and grow very big without needing to re-deploy or re-architect. It also offers a flexible model which uses automatic scaling of throughput capacity, this means that it scales compute capacity based on demand, saving money and lowering entry costs. This makes it a great fit for mobile, gaming, IoT, and other high-growth and high-volume applications.
The Amazon DynamoDB Advantage
Amazon DynamoDB offers multiple advantages over other NoSQL database management systems such as Apache Cassandra and MongoDB. The integration between DynamoDB and other AWS services is especially beneficial. If you are already an AWS user, it’s a great choice.
As a serverless database service, setting up is easy. Simply open the AWS Management Console and utilize the wizard. Conversely, in order to set up an on-premises MongoDB instance, you need to follow a long list of instructions and may have to resolve authentication errors.
Security for DynamoDB is governed by AWS Identity and Access Management (IAM). You can also use other AWS security features to enhance the controls. Although MongoDB is secure, there have been security breaches in the past due to improper configuration and management.
What are the costs?
Both DynamoDB and MongoDB are free for a pre-defined period of time. After free usage expires, DynamoDB calculates cost on the basis of reads and writes, while MongoDB calculates cost according to consumed storage.
What’s the latest?
There are many new features ensure that help this service stand out from the competition. These include:
Amazon DynamoDB Accelerator (DAX)
DAX is a fully managed, secure, and scalable DynamoDB cache service. It is suitable for read-intensive workloads and provides major improvements in DynamoDB’s response time. DAX clusters are hosted by and run in Amazon Virtual Private Cloud (Amazon VPC).
A DAX client should be installed on the Amazon EC2 instance hosting your application in VPC. All requests are routed via the DAX client, which fetches data, if available, from the DAX cluster (a cache hit). If data is not available in the cluster, it will be extracted from DynamoDB (a cache miss). Results will be provided to your application via the DAX cluster.
Caching data in DAX clusters reduces overall read requests on DynamoDB tables, which can save you money. Companies such as Tinder, Expedia, and Genesys all use DAX to enhance the customer experience by providing sub-millisecond response times to customer queries.
Encryption at Rest
Encryption at rest is the newest addition to DynamoDB. To enable it, simply create a new DynamoDB table and uncheck “Use default settings”. Then go to the “Encryption at Rest” section and select “Enable encryption”. AES-256 and AWS Key Management Service (KMS) keys will be used to encrypt the tables and indexes. It is important to note that encryption will not cause latency or performance issues while executing DML and DDL operations.
Scheduled auto-scaling leads to a highly available, fault-tolerant, and cost-effective setup. Defining your scaling policy and auto-scaling in DynamoDB is simple once you understand the steps involved.
Global Tables helps developers build highly resilient, multi-region applications. It ensures that data is close to users located in various locations, leading to a reduction in latency. From a developer’s point of view, data updated in a specific region will automatically synchronize with tables located in other regions. However, prices vary for different regions and customers are charged for replicated writes, reads, and storage.
Amazon DynamoDB has an advantage over other NoSQL databases due to its constant stream of new features and the support from the AWS ecosystem. Being a serverless solution eases a tremendous burden for database administrators. DBAs long had to deal with managing servers and server infrastructure, with serverless computing options they can focus on the database and not the supporting architecture. If you are looking for a NoSQL database service that can deploy quickly, scale easily and deliver on performance, you can be sure it’s a great option.
Comparative Analysis Between Amazon DynamoDB and Other Databases
Compared to other transactional databases, like Oracle, MSSQL, or PostgreSQL, AWS DynamoDB is schemaless, meaning it does not require conformation to a rigid schema of data types, tables, etc. This, though, also comes with a tradeoff: key advantages, like consistently high performance and millisecond latency, are compromised with ACID (atomicity, consistency, isolation, and durability) properties supported by a relational database.
Compared to other NoSQL databases, AWS DynamoDB supports data models like key-value pair (see figure below), and document data structures such as JSON, XML and HTML. But DynamoDB lacks support for columnar data sets, like Cassandra and HBase, and graph models such as Orient DB.
AWS products, DynamoDB included, have a reputation as highly available, scalable, and secure. These are some of the keys to its success:
Availability: When your application writes data to an Amazon DynamoDB table and receives a response (such as Okay), all copies of the data are updated. The data will eventually be consistent across all storage locations, usually within one second or less. This is because DynamoDB has a highly redundant architecture with synchronous data replication stored on SSDs for high performance across three facilities or availability zones in a single region.
Scalability: Automatic partitioning at the database level spreads the data across various partitions and increases the AWS DynamoDB throughput with the growth of the data. To make your life easier, AWS handles this partitioning of data so that customers can concentrate on core aspects.
Security: DynamoDB can be integrated with AWS’ identity and access management (IAM) to provide each user with unique credentials for accessing database resources. Moreover, access can also be authenticated by leveraging your internal AD or LDAP server. Data is also backed up to Amazon Simple Storage Service (S3) in order to maintain high performance on a massive scale all while preserving durability and security.
How AWS DynamoDB Functions
AWS DynamoDB automatically scales throughput capacity to meet workload demands and partitions and re-partitions your data as your table size grows. Here is how it’s done:
Monitoring: CloudWatch is the central pane for monitoring the performance, resource utilization, and operational health of DynamoDB. CloudWatch keeps an eye on the various metrics and triggers an alarm when a threshold is breached. This can further initiate the auto-scaling of resources per the system’s configuration. (See Figure 2.)
Throughput: Throughput capacity is the maximum rate at which something can be produced or processed. It can be managed by DynamoDB’s auto-scaling, provisional throughput, or reserved capacity. Throughput is specified in terms of read capacity units and write capacity units: One read capacity unit represents one strongly consistent read per second, or two eventually consistent reads per second, for an item up to 4 KB in size. One write capacity unit represents one write per second for an item up to 1 KB in size.
The creation of any table or global index in DynamoDB requires specifying the object’s read and write capacity requirements. This lays the foundation for delivering high performance at a consistent pace by reserving required resources for your application.
Data Read Consistency: As mentioned earlier, as AWS DynamoDB is a NoSQL database it may not support ACID properties of a relational database. However, it still provides a degree of flexibility by supporting what are called eventually consistent reads—when a read request from a DynamoDB table does not immediately reflect the last committed transaction but does after waiting and trying again—and strongly consistent reads—when a read request returns the last saved data from the successful write transaction.
Zero Management: With this managed service model, you don’t have to worry about managing infrastructure layers, like network and storage connectivity, OS patching, server health, or backup, among others, as AWS does this for you.
Easy Integration and Open APIs: DynamoDB provides APIs for managing tables and indexes and for performing various data operations (like read and write). It also supports integration with Amazon Redshift, Elasticstack and IAM, among others.
Industry-Wide Usages of DynamoDB
AWS DynamoDB has a strong and industry-wide presence. It also has a variety of use cases, ranging from IoT stories for capturing sensor data from home security systems to triggering real-time notifications for required parties via enabling streams. Another powerful use case is in the gaming industry, where games (which are generally write intensive) are continuously writing each event to the database layer so that the data is not lost.
There is, consequently, no dearth of uses for DynamoDB. To get going, you just need to find the right match per your requirements and then refer to the easy-to-use features highlighted above. With DynamoDB providing consistently high performance at large scale deployments, coupled with its ease of managing complex infrastructures, Amazon has made life simpler and more productive for the developer community.
- How to Copy EBS Snapshots to Amazon S3 and Save on Storage Costs
- 7 Steps to Save Big on Your AWS Bill
- 10 Tips for a Solid AWS Disaster Recovery Plan