SQL - RDS Flashcards
What is RDS?
o RDS is a Database as a Service product, which can be used to provision a fully functional DB without the admin overhead traditionally associated with DB platforms
o It can perform at scale, be made publicly accessible, and can be configured for demanding availability and durability scenarios
o RDS supports a number of database engines (MySQL, MariaDB, PostgreSQL, Oracle, MS SQL Server)
What Instance Types and Storage Types are supported by RDS?
o RDS can be deployed in a single AZ or Multi AZ (for resilience) and supports the following instance types: General purpose, Memory Optimized, Burstable
o Two types of storage are supported: General Purpose SSD and Provisioned IOPS SSD
How is RDS charged?
o RDS Instances are charged based on instance size, provisioned (not used!) storage, IOPS (if using io1), data transferred out, any backup/snapshots beyond the 100% that is free with each DB instance
How is RDS supporting encryption?
o RDS supports encryption, with the following limitations/conditions:
E. can be configured when creating DB instances
E. can be added by taking a snapshot, making an E. snapshot and creating a new instance from that E. snapshot
E. cannot be removed
Read Replicas need to mimic the primary instance state
E. snapshots can be copied between region, but a new destination region KMS CMK is used (given they are region specific)
How do Backups and Restores work in RDS?
o RDS is capable of a number of different types of backups
o Automated Backups to S3 occur daily, and can be retained from 0 to 35 days (with 0 being disabled)
o Manual Snapshots are taken manually and exists until deleted
o Point in time log-based backups are also stored on S3, and happen every 5 minutes
o Note: Restores create a new RDS instance with a new endpoint address – this will require application changes or DNS changes (CNAME)
o Note: Restoring a DB RDS will create a new DB, meaning the existing one will not be overridden
How is RDS supporting Resilience - Multi AZ?
o RDS can be provisioned in single or multi-AZ mode
o Multi-AZ provisions a primary instance and a standby instance in a different AZ of the same region, with automatic, synchronous replication
o Only the primary can be accessed, using the instance CNAME
o If a failover happens, CNAME is changed automatically to point to the standby instance, which becomes the new primary, until the problem is resolved
o There is no performance benefit, but it provides a better RTO compared to restoring a snapshot
How do RDS Read Replicas work?
o Read Replicas are read-only copies of an RDS instance that can be created in the same region, or in a different region from the primary instance
o They can be addressed independently, each having their own DNS name, and used for read workloads, allowing to scale reads
o Up to 5 read replicas can be created from a single RDS instance, allowing a 5X increase in read performance
o Read Replicas can be created from Read Replicas, they can be promoted to primary instances and can themselves be Multi-AZ
o Read from Read Replicas are eventually consistent – normally seconds, but the application needs to support it (asynchronous mode)