dynobase-icon
Dynobase

DynamoDB vs Amazon RDS - The Ultimate Comparison

Nishani Dissanayake

Written by Nishani Dissanayake

Published on December 25th, 2021

    Still using AWS console to work with DynamoDB? 🙈

    Time to 10x your DynamoDB productivity with Dynobase [learn more]

    DynamoDB and Amazon RDS are two popular cloud-based database services managed and offered by Amazon Web Services (AWS). These two services are widely in use around the globe.

    In this article, I will be discussing what these two services are and their similarities and differences.

    DynamoDB and Amazon RDS: An Overview

    DynamoDB is a fully managed NoSQL database service provided by Amazon Web Services. It is known for its high performance, reliability, and scalability, making it easier to handle large volumes of unstructured data.

    On the other hand, Amazon RDS stands for "Relational Database Service" and is used for structured and relational data (SQL). Unlike DynamoDB, RDS is a service that supports multiple database engines, including Amazon Aurora, MySQL, MariaDB, PostgreSQL, Oracle, and SQL Server.

    Shared Attributes for DynamoDB and Amazon RDS

    DynamoDB and Amazon RDS are both fully managed by AWS, thus simplifying administration and allowing developers to focus more on using the database service. Both services are reliable and highly scalable with automated scalability and backup.

    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. However, with RDS, the storage size varies based on the database engine used:

    • Aurora engine: 128 TB
    • MySQL, MariaDB, Oracle, PostgreSQL engines: 64 TB
    • SQL Server engine: 16 TB

    Performance of DynamoDB vs Amazon RDS

    DynamoDB

    DynamoDB is known for its high performance, capable of handling more than 10 trillion requests within a single day with peaks greater than 20 million requests per second.

    There is minimal latency and response time when reading and writing data due to the high IO performance of SSDs. Additionally, the in-memory cache, DynamoDB Accelerator (DAX), can enhance read performance by up to ten times, reducing read time from milliseconds to microseconds.

    Regardless of the table size, DynamoDB maintains low latency, typically within milliseconds. Proper use of indexes and partitioning can further optimize performance.

    Amazon RDS

    Amazon RDS offers two SSD-backed storage options: a high-performance choice for OLTP applications and a cost-effective solution for general-purpose use.

    The general-purpose solution delivers performance at 3 IOPS per provisioned GB, scaling up to 3000 IOPS. The high-performance option can deliver up to 40,000 IOPS per database instance, maintaining this high IOPS rate throughout the database instance's lifetime.

    Availability and Durability

    In DynamoDB, data is automatically replicated across three availability zones. However, users can only choose a region, not specific availability zones. This multi-zone replication ensures data availability even during power outages or significant natural disasters. If one node fails, data flow continues uninterrupted with the other nodes.

    Amazon RDS uses Multi-AZ deployments to enhance database availability. In case of hardware failure, the requested data is made available by replacing the compute instance powering the database instance with a functional one.

    However, Multi-AZ deployments are optional and come with additional costs, as multiple instances (master-slave) are required to provide active-passive failover and high availability.

    Security

    DynamoDB integrates well with IAM, providing fine-grained access control to limit access using IAM policies. As a cloud-native database offering, it also supports encryption with AWS KMS (Key Management Service). Users can choose from three encryption options:

    • AWS-owned key (free and encrypts the key by default)
    • AWS-managed key (fee-based, stored in the user's account)
    • Customer-managed key (fee-based, with complete user control)

    Amazon RDS also integrates with IAM for authentication for MySQL and PostgreSQL engines and uses AWS KMS for encryption. Users can enhance data security with SSL.

    Comparing Other Features of DynamoDB and Amazon RDS

    Backups

    DynamoDB offers Point-in-time recovery (PITR), providing continuous backups and allowing users to restore the database table to any point in time within the preceding 35 days. This process does not affect database performance or interrupt user work.

    Amazon RDS also supports PITR through automatic backups stored as database snapshots in Amazon S3 until intentionally deleted by the user.

    Scalability

    Amazon DynamoDB is highly scalable, supporting virtually any table size. It seamlessly scales based on workload requirements, maintaining performance. Users can choose between two modes:

    • On-demand
    • Provisioned capacity mode (user-defined limits)

    Similarly, Amazon RDS supports auto-scaling, allowing users to set maximum capacity with a few clicks. Users can choose between on-demand or reserved capacity.

    When and Where to Pick Which Database Service

    Choosing the right database depends on specific use cases. Below are some scenarios for using DynamoDB and Amazon RDS.

    Use cases for DynamoDB

    Relational databases can be costly and complicated in some instances. In such cases, NoSQL databases like DynamoDB are ideal.

    When using AWS services, DynamoDB is a highly scalable NoSQL database model. It supports seamless scaling and backups without performance interruption, making it suitable for systems requiring high-speed data reading and writing. Examples include:

    • Real-time bidding
    • Shopping carts
    • Mobile applications
    • Content management
    • High I/O needs
    • Unstructured data in gaming applications

    You can read more about the use cases for DynamoDB here.

    Use cases for Amazon RDS

    Amazon RDS is used for structured and relational data, making it suitable for relational backend databases.

    Enterprise applications often require a relational database model due to the nature of data storage. In such cases, NoSQL databases like DynamoDB are not suitable. RDS is ideal for traditional applications, enterprise-grade applications, CRM, e-commerce solutions, and as a source system for data warehouses.

    Pricing

    DynamoDB

    The standard pricing for DynamoDB includes charges for reading, writing, and storage consumed by data. Additional services may incur extra costs. DynamoDB calculates read and write units based on data size: 4KB reads and 1KB writes. Global Secondary Indexes (GSIs) also affect pricing.

    There are two pricing tiers:

    1. On-demand capacity mode: Payment is based on application traffic, allowing the database instance workload to scale up and down as needed. This option is ideal for unpredictable database traffic, with payment only for usage.
    2. Provisioned capacity mode: Users specify reads and writes per second, with optional auto-scaling to adjust table size automatically. This solution is suitable for predictable and consistent application traffic.

    Amazon RDS

    Amazon RDS charges a monthly fee for each database instance, with a pay-as-you-go model. Pricing varies based on the database engine (MySQL, Aurora, etc.) and server capacity used.

    RDS offers an on-demand pricing model, similar to DynamoDB, but it is more expensive than reserved instance pricing available for Amazon Aurora. Reserved instances require long-term payment commitments (one or three years).

    You can read all about the pricing options here.

    Conclusion

    In this article, I discussed the similarities and differences between two popular database services, DynamoDB and Amazon RDS, fully managed by Amazon Web Services (AWS). I hope you now have a better understanding of these services and their use cases.

    Thank you for reading!

    Tired of AWS Console? Try Dynobase.

    Start your 7-day free trial today

    Product Features

    Download
    /
    Changelog
    /
    Pricing
    /
    Member Portal
    /
    Privacy
    /
    EULA
    /
    Twitter
    © 2024 Dynobase