RDS, Aurora & ElastiCache Flashcards
What is Amazon RDS?
- It’s a managed DB service for DB use SQL as a query language.
What are the supported RDS engines?
- Postgres
- MySQL
- MariaDB
- Oracle
- Microsoft SQL Server
- Aurora (AWS Proprietary database)
What are the advantages to RDS vs EC2 with db?
- Automated provisioning, OS patching
- Continuous backups and restore to specific timestamp (Point in Time Restore)!
- Monitoring dashboards
- Read replicas for improved read performance
- Multi AZ setup for DR (Disaster Recovery)
- Maintenance windows for upgrades
- Scaling capability (vertical and horizontal)
- Storage backed by EBS (gp2 or io1)
BUT you can’t SSH into your instances
What is RDS - Storage Auto Scaling?
- Helps you increase storage on your RDS DB instance
dynamically - When RDS detects you are running out of free database
storage, it scales automatically - Avoid manually scaling your database storage
- You have to set Maximum Storage Threshold (maximum limit for DB storage)
Why is auto scaling used?
Useful for applications with unpredictable workloads * Supports all RDS database engines (MariaDB, MySQL,
PostgreSQL, SQL Server, Oracle)
What are RDS Read Replicas?
Async replications of the main db. Reads are eventually consistent.
What are the main features of Read Replicas?
- Up to 15 Read replicas
- Within AZ, Cross AZ or Cross Region
- Can be promoted to main DB
- App must handle connection string change to read from them
Whats the uses cases of Read Replicas?
Prod application writes to main db. Reporting application reads the data from the replica.
What are the network costs for read replicas?
They are free within a region but cross region you have to pay for it.
What is RDS Multi AZ (Disaster Recovery)?
Sync replication of the main db. Its a standby in case of failover.
* One DNS name – automatic app
failover to standby
* Increase availability
* Failover in case of loss of AZ, loss of network, instance or storage failure
* No manual intervention in apps
* Not used for scaling
* Note:The Read Replicas be setup as
Multi AZ for Disaster Recovery (DR)
Can you move Single AZ RDS to Multi-AZ?
Yes you can. It has zero downtime. Click on “modify” and change it.
What is Amazon Aurora?
Aurora is “AWS cloud optimized” and claims 5x performance improvement
over MySQL on RDS, over 3x the performance of Postgres on RDS.
What are the main advantages of Aurora?
- Aurora storage automatically grows in increments of 10GB, up to 128 TB.
- Aurora can have 15 replicas while MySQL has 5, and the replication process
is faster (sub 10 ms replica lag) - Failover in Aurora is instantaneous. It’s HA (High Availability) native.
- Aurora costs more than RDS (20% more) – but is more efficient
What is Aurora High Availability and Read Scaling?
- 6 copies of your data across 3 AZ:
- 4 copies out of 6 needed for writes
- 3 copies out of 6 need for reads
- Self healing with peer-to-peer replication
- Storage is striped across 100s of volumes
- One Aurora Instance takes writes (master)
- Automated failover for master in less than 30 seconds
- Master + up to 15 Aurora Read Replicas serve reads
- Support for Cross Region Replication
What are the 2 endpoints of an Aurora DB Cluster?
- Writer endpoint => pointing to Master db
- Reader endpoint => Connection to Load Balancing