Relational Databases - Achieving High Availability with Amazon RDS and Aurora
Learn how to build highly available relational databases using Amazon RDS and Aurora.
The Value of Managed Relational Databases
Relational databases are the backbone of enterprise core systems, indispensable for transaction processing, data integrity, and complex query handling. Amazon RDS is a fully managed relational database service supporting five engines: MySQL, PostgreSQL, MariaDB, Oracle, and SQL Server. On-premises database operations involve enormous operational tasks such as hardware procurement, OS installation, DB engine setup, patching, backups, and replication configuration, with roughly 70% of a DBA's time reportedly spent on these routine tasks. RDS offloads these operational tasks to AWS, freeing DBAs to focus on high-value work like schema design and query optimization. Automated backups support a retention period of up to 35 days, with point-in-time recovery (PITR) available at 5-minute intervals.
Amazon Aurora's Innovative Architecture
Amazon Aurora is a cloud-native relational database developed by AWS, delivering up to 5x the throughput of MySQL and up to 3x that of PostgreSQL. Aurora's storage is automatically replicated across 6 copies spanning 3 Availability Zones and auto-scales up to 128 TB. This distributed storage architecture eliminates the need for storage pre-provisioning, and you pay only for what you use. Aurora supports up to 15 read replicas with replication lag typically under 20 milliseconds. Failover completes within 30 seconds, maximizing application availability. Below is an example CLI command to create an RDS for PostgreSQL instance. aws rds create-db-instance \ --db-instance-identifier my-postgres-db \ --db-instance-class db.r6g.large \ --engine postgres \ --engine-version 15.4 \ --master-username admin \ --master-user-password MySecurePassword123 \ --allocated-storage 100 \ --multi-az \ --storage-encrypted
Serverless Databases with Aurora Serverless v2
Aurora Serverless v2 is a serverless option that automatically scales database capacity based on workload demand. It scales from 0.5 ACU (Aurora Capacity Unit) up to 256 ACU in fine-grained 0.5 ACU increments, responding instantly to demand fluctuations. In development and test environments, it minimizes costs during idle periods while automatically scaling up during load tests. Aurora Serverless v2 can coexist with provisioned instances in the same cluster, enabling hybrid configurations that distribute read workloads to serverless read replicas. On-premises databases require hardware sized for peak loads to run continuously, often resulting in average utilization rates of just 20-30%. Aurora Serverless v2 charges per ACU-second, minimizing resource waste. For a deep understanding of AWS database design and operations, specialized books (Amazon) are a valuable resource.
Global Deployment and Disaster Recovery
Aurora Global Database lets you build a global database cluster spanning one primary region and up to 5 secondary regions. Replication lag to secondary regions is typically under 1 second, and failover during a regional outage completes within 1 minute. This achieves disaster recovery with an RPO (Recovery Point Objective) of under 1 second and an RTO (Recovery Time Objective) of under 1 minute. RDS Multi-AZ deployment automatically fails over to a standby instance when the primary instance fails, minimizing application downtime. RDS Proxy handles database connection pooling and management, efficiently processing the large volume of short-lived connections from serverless applications like Lambda. Building equivalent disaster recovery on-premises would require dedicated lines to remote data centers, replication software, and failover procedures, demanding investments on the order of hundreds of millions of yen.
RDS and Aurora Pricing
RDS db.r6g.large costs approximately $0.252 per hour (about $181/month). Aurora costs approximately $0.29/hour for equivalent specs but delivers up to 5x the throughput. Storage costs are approximately $0.08 per GB/month for RDS gp3 and approximately $0.10 for Aurora. Reserved Instances offer discounts of up to 72%. Aurora Serverless v2 uses pay-per-use ACU (Aurora Capacity Unit) pricing at approximately $0.12 per ACU-hour.
Summary - Choosing the Right Relational Database
Amazon RDS and Aurora fundamentally transform relational database operations. They dramatically reduce DBA operational burden while ensuring enterprise-grade availability and durability. Choose Aurora when you need high performance with MySQL/PostgreSQL compatibility, and RDS when full compatibility with a specific engine is required.