Amazon RDS

A fully managed service for operating major relational databases including MySQL, PostgreSQL, Oracle, and SQL Server in the cloud

Overview

Amazon Relational Database Service (RDS) is a fully managed service that simplifies the setup, operation, and scaling of relational databases in the cloud. It supports six database engines: MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, and Amazon Aurora. AWS automatically handles operational tasks such as OS patching, database backups, point-in-time recovery, Multi-AZ failover, and read scaling via read replicas. RDS Proxy streamlines database connection pooling and management, handling sudden connection surges from serverless applications like Lambda. Instance classes range from db.t3.micro (2 vCPUs, 1 GB memory) to db.r6g.16xlarge (64 vCPUs, 512 GB memory), accommodating workloads of any scale.

Multi-AZ Failover and Backup Strategy

Enabling Multi-AZ deployment on RDS automatically creates a standby instance in a separate Availability Zone from the primary. If the primary fails, a DNS record switch completes failover in approximately 60-120 seconds. Automated backups consist of daily snapshots and continuous transaction log recording, allowing you to restore the database to any point within the last 35 days (point-in-time recovery). Read replicas distribute read queries to reduce load on the primary, and cross-region read replicas serve as a disaster recovery (DR) measure. RDS offers six database engines under a single service (MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, Aurora), unlike Azure where you need to use separate services for each engine (Azure SQL Database, Azure Database for MySQL/PostgreSQL).

RDS Proxy and Serverless Connection Optimization

When connecting to RDS from serverless applications like Lambda, the number of database connections surges proportionally with concurrent function executions, often hitting connection limits. RDS Proxy is a connection pooling service that solves this problem by pooling and reusing the large volume of short-lived connections from Lambda, keeping the actual connection count to the database under control. Integration with IAM authentication lets you manage passwords in Secrets Manager while automating connection-time authentication. RDS Proxy also transparently handles connection switching during failover, simplifying retry logic on the application side. Specialized books on Amazon cover these connection management design patterns in detail.

Choosing Between Standard RDS and Aurora

When using MySQL or PostgreSQL on RDS, a key decision is whether to use a standard RDS instance or Amazon Aurora. Aurora delivers up to 5x the throughput of MySQL and up to 3x that of PostgreSQL, with storage that automatically scales from 10 GB to 128 TB. Up to 15 read replicas can be created with Aurora, far exceeding the 5-replica limit of standard RDS. However, Aurora pricing is approximately 20% higher than standard RDS. For small applications or cost-sensitive workloads, standard RDS is the better fit. For mission-critical workloads that demand high performance and availability, Aurora is the stronger choice. Aurora Serverless v2 automatically scales capacity based on traffic, minimizing costs during idle periods. Applying Reserved Instances (1-year or 3-year terms) yields discounts of up to 69%, delivering significant cost savings for environments with stable baseline loads.

共有するXB!