RDS, Aurora, Elastic Cache Flashcards
What does RDS stand for?
Relational Database Service
What types of SQL engines are supported by AWS?
Potsgres, MariaDB, Oracle, MS SQL Server, IBM DB2, Aurora (AWS proprietary)
What are the main features / benefits of using RDS?
Automated provisioning, OS patching, continuous backups and restoring, monitoring, read replicas for improved read performance, multi AZ setup for disaster recovery, maintenance windows for upgrades, scaling
Can you SSH into RDS instances?
No
What is RDS storage auto-scaling?
Automatically increase storage on RDS instance, you must set a maximum storage threshold (max size). Scaling will happen when free storage is less than x% and the low storage state lasts more than n mins and 6 hours have passed since last modification. Useful for apps with unpredictable workloads. Supports all RDS engines.
What are the main features of RDS read replicas?
Read replicas are replicated data for reads only. Up to 15 read replicas are possible. Can be within AZ, across AZ or across regions. Replication is async. Replicas can be promoted to their own DB. Apps must update connection string to use read replicas.
What is the maximum number of RDS read replicas you can have?
15
What is a common use case for using RDS read replicas?
Reporting / analytics apps
How many Aurora Read Replicas can you have in a single Aurora DB Cluster?
15
In what scenario will a cost be incurred for RDS read replica network traffic?
When data goes across regions but not within the same region
What is RDS Multi AZ?
Synchronous replication to a standby instance, in the event of an outage with the master db the standby becomes the master. One DNS name is used, no changes needed in apps. Not used for scaling, just increased availability.
Can RDS read replicas be set up as Multi AZ?
Yes
How do you change a single AZ RDS database into a multi AZ database?
Just click on “modify” for the database. This is a zero downtime operation.
What happens when you change a single AZ RDS database into a multi AZ database?
A database snapshot is taken of the master, a new database is restored from the snapshot in the AZ, synchronisation is established between the two.
What is Amazon Aurora?
Proprietary database technology from AWS. Postgres & MySQL are supported. Is cloud optimised and more performant than RDS. Storage auto grows up to 128TB. Can have up to 15 replicas, replica process faster than RDS, failover is instantaneous. Costs 20% more than RDS.
How does Amazon Aurora work?
One master database, multiple read replicas. Stores copies across multiple AZ’s for example across 3 AZs 6 copies are written. Automatic failover for master. Support for cross region replication.
How do clients interact with an Aurora db cluster?
Writes to the database use a writer endpoint, data gets written to the master. For reading, since there can be multiple read replicas which can be auto-scaled a reader endpoint is used which handles connection load balancing. Load balancing happens at the connection level rather than statement level.
What does the RDS proxy do?
Allows apps (eg. lambda) to pool and share DB connections. Improves DB efficiency by reducing stress on DB resources (cpu, ram) and minimise open connections. Is serverless, supports autoscaling, HA multi AZ. Reduces RDS & Aurora failover times. Can be used to enforce IAM authentication for DB.
Can a RDS proxy be publicly accessible?
No, it must be accessed from a VPC (virtual private network).
What is ElastiCache?
Managed Redis or Memcached
What are the different main use-cases for Redis vs Memcached?
Redis is good for high availability with the ability to have replicas. Memcached doesn’t have replication or the ability to backup and restore, it can shard the data between nodes.
What are the main features of Redis?
Multi AZ with auto-failover. Read replicas to scale reads and have high availability. Backup and restore features. Supports sets and sorted sets.
What are the main features of Memcached?
Multi-node for partitioning of data (sharding). No high availability. Non persistant. No backup and restore. Multi-threaded.
What is Cache-Aside or Lazy Population in terms of caching?
Also known as lazy loading, data is cached by the app after it has been requested from the database. The app first queries the cache, when cache miss read from db then add to cache. Max number of reads could be three.