RDS, Aurora, Elastic Cache Flashcards

1
Q

What does RDS stand for?

A

Relational Database Service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What types of SQL engines are supported by AWS?

A

Potsgres, MariaDB, Oracle, MS SQL Server, IBM DB2, Aurora (AWS proprietary)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the main features / benefits of using RDS?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Can you SSH into RDS instances?

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is RDS storage auto-scaling?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the main features of RDS read replicas?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the maximum number of RDS read replicas you can have?

A

15

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a common use case for using RDS read replicas?

A

Reporting / analytics apps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How many Aurora Read Replicas can you have in a single Aurora DB Cluster?

A

15

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

In what scenario will a cost be incurred for RDS read replica network traffic?

A

When data goes across regions but not within the same region

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is RDS Multi AZ?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Can RDS read replicas be set up as Multi AZ?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you change a single AZ RDS database into a multi AZ database?

A

Just click on “modify” for the database. This is a zero downtime operation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What happens when you change a single AZ RDS database into a multi AZ database?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is Amazon Aurora?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How does Amazon Aurora work?

A

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.

17
Q

How do clients interact with an Aurora db cluster?

A

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.

18
Q

What does the RDS proxy do?

A

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.

19
Q

Can a RDS proxy be publicly accessible?

A

No, it must be accessed from a VPC (virtual private network).

20
Q

What is ElastiCache?

A

Managed Redis or Memcached

21
Q

What are the different main use-cases for Redis vs Memcached?

A

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.

22
Q

What are the main features of Redis?

A

Multi AZ with auto-failover. Read replicas to scale reads and have high availability. Backup and restore features. Supports sets and sorted sets.

23
Q

What are the main features of Memcached?

A

Multi-node for partitioning of data (sharding). No high availability. Non persistant. No backup and restore. Multi-threaded.

24
Q

What is Cache-Aside or Lazy Population in terms of caching?

A

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.

25
Q

What is the Write Through cache strategy?

A

Add or update the cache when the database is updated. The app inserts into the database and the cache. Max number of writes could be two.

26
Q

What three ways can cache eviction happen?

A

App deletes from cache. Item is evicted because the memory is full and its not recently been used (LRU). A TTL (time to live) expires.

27
Q

What is MemoryDB?

A

Redis compatible, durable in-memory database service. Ultra fast performance (over 160 million requests per second). Scale up to 100TBs. Use cases include web and mobile apps, online gaming, streaming

28
Q

We have an RDS database that struggles to keep up with the demand of requests from our website. Our million users mostly read news, and we don’t post news very often. Which solution is NOT adapted to this problem? ElastiCache cluster, RDS Multi-AZ, RDS Read Replicas.

A

RDS Multi-AZ. ElasticCache and RDS Read Replicas will both help with scaling reads.

29
Q

Which RDS (NOT Aurora) feature when used does not require you to change the SQL connection string? Read Replicas or Multi-AZ

A

Multi-AZ keeps the same connection string regardless of what database is up

30
Q

ou would like to create a disaster recovery strategy for your RDS PostgreSQL database so that in case of a regional outage the database can be quickly made available for both read and write workloads in another AWS Region. The DR database must be highly available. What do you recommend?

A

Create a read replica in a different region and enable Multi-AZ on the read replica

31
Q

What is the maximum number of Read Replicas you can add in an ElastiCache Redis Cluster with Cluster-Mode Disabled?

A

5