RDS
Introduction
Relational database service (RDS), including:
Amazon Aurora
PostgreSQL
MySQL
MariaDB
Oracle
Microsoft SQL Server.
Feature
Storage with 10Gb per database in EBS (gp2 or io1)
2 copies of data in each AZ with minimum of 3 AZs (can choose AZ, and have 6 copies at least)
Backups
Automated Backup
To recover database to any point in time in a retention period (5 minutes~35 days, 7 days as default).
Daily snapshots and transaction logs through the day (can do recovery down to a second)
Enabled by default, the backup takes the same size with DB and is saved on S3 freely
Will be deleted when DB is deleted
Snapshot
Manual operation, can copy cross region
Won't be deleted when DB is deleted
Additional support for Oracle
Oracle Export/Import Utilities
Oracle Data Pump Export and Import
Not support: Oracle Recovery Manager (RMAN), Replication Backups
Encryption (for EBS, Snapshot)
Using AWS Key Management Service (KMS)
If a RDS is encrypted, its automated backups, read replicas, snapshots are encrypted as well
To encrypt an existing DB is not supported, instead create a new DB instance with encryption enabled then migrate data
Disaster recovery with Multi-AZ deployments (synchronous replication for guarantee of durability)
supports:
PostgreSQL (physical replication)
MySQL (physical replication)
MariaDB (physical replication)
Oracle (physical replication)
SQL server (logical replication)
Have an exact copy of RDS in another AZ for automatic failover processing
DR for entire region down
Promote a read replica in a different region to stand alone DB (Single AZ).
Then reconfigure it as multi-AZ.
If being asked for data durability, still need to set up backups rather than only depending on multi-AZ.
Read Replica (for scalability, it's eventual consistent)
Improve performance by using asynchronous replication from the primary RDS instance to the read replicas
Must have automatic backups turned on in order to deploy a read replica
Can have up to 5 replicas to any database
Can have replicas of read replicas
Can become an independent database but break the replication
Support for:
Aurora
PostgreSQL
MySQL
MariaDB
Read replica can be in another region
Read Replicas use automatic backups for managing read replica logs
To disable automatic backup, remove the read replicas first.
To export RDS data to a MySQL instance running external to Amazon RDS
Prepare an external MySQL DB instance.
Prepare the source RDS MySQL DB instance for replication.
Use the mysqldump utility to transfer the database from the source MySQL DB instance to the external MySQL database.
Start replication to the external MySQL database.
After the export completes, stop replication.
RDS maintenance
For updates marked as
Required
, You receive a notice from Amazon RDS indicating when the update will be performed, if you defer a required update.For updates marked as
Available
, you can defer indefinitely.
Transparent Data Encryption (TDE) are supported with Oracle, SQL Server.
IAM Authentication for MySQL and PostgreSQL (authorization still happens inside RDS).
Can copy an un-encrypted RDS snapshot into an encrypted one.
CloudTrail cannot be used to track queries within RDS.
Anti-patterns and suitable solutions
Lots of binary objects (S3)
Automated scalability, unstructured data, key-value data (DynamoDB)
Unsupport RDB types (Oracle DB2, SAP HANA), complete control of DB (EC2)
Cross region failover
DynamoDB Scaling vs RDS Scaling
DynamoDB offers a "push button" for easy scaling and leads no down time
RDS needs manual operation to scale out (add replicas)/up (add instance size)
RDS in on-premises VMware environments.
Migration to RDS by promoting RDS Read Replica, no need for DMS.
Last updated