Relational Database Service (RDS) Flashcards
What are the different types of RDS database Instances in terms of size, memory optimisation etc?
db. m5 - general purpose type
db. r5 - memory optimised
db. t3 - burst instance
All can be different sizes, single or multi AZ
What are the types of storage that can be used for database instances?
io1 - high end performance, lots of iops and low latency
gp2 - same burst profile as EC2, should be good for most
magnetic -long term historic use
How is database storage billed?
Amount of storage allocated GB/month
e.g. 100GB for 1 month costs same as 200Gb for half month
How do you connect to RDS in a multi AZ environment? Which instance does the connection always default to?
Only via CNAME defaulting to the primary always. Should an issue occur on the primary the CNAME will switch to. Standby cannot be directly used and does not scale performance only gives HA. Multi AZ can only be in the same region (other AZ’s in the VPC)
Is RDS multi AZ high availability and fault tolerant?
Highly available but not fault tolerant, in a failover operation there will be some impact/disruption, it takes 60-120 seconds
In a multi AZ RDS setup where are backups taken from?
always from standby/replica (removes performance impact as al connection are defaulted to primary)
What types of backups are available for RDS?
- Automatic Backups
- Manual Snapshots - function like EBS snapshots, 1st is full copy, onward are incremental. Causes brief interruption in flow of data between compute resource and storage. In Single AZ may cause blip in multi it will use the secondary hence no effect.
Both utilise S3 (AWS managed buckets, not visible in console) therefore region resilient (replicated across multiple AZ’s in region)
If you delete an RDS instance what happens to existing backup snapshots?
They remain on S3 buckets
How is it possible to ensure an RPO for transaction logs of 5 minutes on RDS?
Database transaction logs are copied to S3 every 5 minutes therefore snapshot can be restored and transaction overlaid. All automated backups expire based on retention period set
Limitation of RDS restore?
Restores aren’t fast, think about RTO
Why? Restore creates a new instance which will have a NEW ADDRESS (CNAME)
How can you protect RDS against data corruption?
Snapshots (auto or manual)
Replication can replicate corruption
In what instance would RDS use synchronous vs asynchronous replication to a replica
Synchronous - Multi AZ, copies the data to the pri and sec disks at the same time
Asynchronous - for read replicas, copies data to replica after copying to the primary
Whats the max number of read replicas you can have per DB instance?
5x
For scale out read capability, each providing additional read performance
Read replicas can have read-replicas but lag starts to be a problem e.g. chained replicas
How can you improve your RPO and RTO (availability improvements) for RDS?
Snapshots & Backups improve RPO
Read replicas offer near 0 RPO, can promote read replica quickly upon primary failure (TO READ AND WRITE) - low RTO. This works for failure only, watch out for data corruption
In what scenarios would you use Aurora Serverless?
- Infrequently used applications
- New applications
- Variable workloads
- Unpredictable workloads
- Development & test databases
- Multi-tenant application - you’re providing