RDS + Aurora + ElastiCache Flashcards
(26 cards)
What is Amazon RDS?
Managed DB service for DB using SQL as query language
RDS Storage Auto Scaling
When RDS detects you are running out of free database storage, it scales automatically (set maximum storage threshold limit for maximum DB storage), good for unpredictable workloads
RDS Read Replicas
read-only copies of a primary database instance, used to offload read-heavy workloads and improve database performance (only for reading, not updating, as it is async)
RDS Read replica use case
Team wants to run reporting application on the prod DB but don’t want to slow prod DB down
RDS Read Replicas network costs
same region/different AZ does not incur a cost but cross region does
RDS Multi AZ (disaster recovery)
SYNC replication of DB to standby database to increase the availability, resistant to loss of AZ or network or storage failure
Can Read Replicas be set up as Multi AZ for disaster recovery?
Yes
How to make RDS from single AZ to multi AZ?
Zero downtime operation (don’t need to stop DB), just click on modify for the DB to create standby DB
Amazon Aurora
Proprietary DB from AWS, cloud optimised, automatically grows in increments of 10GB
Aurora DB Cluster Writer Endpoint
Points to the master (as only master writes to DB)
Aurora DB Cluster Reader Endpoint
Connects to all read replicas for connection load balancing
At rest encryption
Data is encrypted on the volumes
In flight encryption
encryption between client and DB
Can you use IAM authentication for accessing DB?
yes
Does RDS and Aurora have SSH access?
no (except for custom RDS)
Amazon RDS proxy
improves DB efficiency by reducing stress on database resources and minimizing open connections by pooling connections
How do you enforce IAM auth for your database?
Use Amazon RDS proxy, enable IAM auth, store credentials in AWS secrets manager
Amazon ElastiCache
Helps reduce load off DBs for read intensive workloads by caching
What is a cache hit?
Query has already been made and it is stored in the cache
What is Redis?
Multi AZ with auto failover, read replicas to scale reads and have high availability, backup and restore reatures
What is Memached?
Multi node for partitioning of data, no high availability (read replica), backup and restore only for serverless
When is it good to cache data?
Data changing slowly, few keys are frequently needed
What is Lazy Loading / Cache-Aside / Lazy population?
In the case of a cache miss, read from DB and write the data to cache (can be slow, data can get stale)
What is write through?
When application writes to DB, also write to the cache (data in cache never stale, but a lot of the data will never be read)