RDS, Aurora, and ElastiCache Flashcards

1
Q

What are the benefits of RDS being a managed service?

A
  1. Automated provisioning
  2. Continuous backups and point in time restore
  3. Monitoring dashboards
  4. Read replicas
  5. Multi AZ setup for disaster recovery

(You can’t SSH into the RDS)

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

What are the conditions of RDS auto scaling?

A
  1. Free storage is less that 10%
  2. Low-storage lasts at least 5 minutes
  3. 6 hours have passed since last modification
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What do read replicas allow you to do?

A

Allows you to scale up to 15 read replicas that can either be within AZ, cross AZ, or cross region. This replication is async which means it is eventually consistent. They can also be promoted to their own database aswell. (Good use case is duplicating data to another database for a reporting application to run on)

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

When will read replica network usage be charged?

A

When the read replica is in a different region

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

What does RDS Mutli AZ allow you to do?

A

Multi AZ is sync replication and is purely used as a standby database in case failover is required

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

How can you change an RDS from single-AZ to multi-AZ?

A

Just click ‘modify’ in the database, it is a zero downtime operation

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

What increments does Aurora storage grow in?

A

10gb

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

Why is Aurora good for high availibity and read scaling?

A

6 copies of your data will be stored across 3 AZ

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

How does read replicas work with Aurora?

A

There is 1 master Aurora instance and up to 15 read replicas which will access a shared storage volume.

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

Define a writer and reader endpoint

A

Writer endpoint - Points to a master instance which will perform writes
Reader endpoint - Connection point which will load balance traffic across multiple read replicas

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

What are the 2 forms of encryption?

A
  1. At-rest encryption where the storage is encrypted using AWS KMS
  2. In-flight encryption which uses AWS TLS root certificates client side
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Why would you want to use an Amazon RDS Proxy?

A

Allows you to pool and share DB connections into a database, thus improving database efficiency. Also reduces failover time by up to 66% and allows you to enforce IAM authentication.

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

What is the purpose of Amazon ElastiCache?

A

It is a managed service for Redis or MemCache

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

Describe how AWS ElastiCache could be used to manage user sessions

A

Suppose a user accesses an application and creates a session, this session can be written to an ElastiCache instance. The next time the user accesses an application on a different EC2 instance, the session can be retrieved from the ElastiCache service.

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

What technology does Redis use?

A

Replication across multi AZ and read replicas to scale

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

What technology does Memcached use?

A

Sharing allowing for multi-threaded architecture but no high availability

17
Q

Describe the lazy loading / cache aside / lazy population cache strategy and list 2 pros and 2 cons?

A

When data is requested, the cache is checked to see if it contains an entry. If it does, that entry is returned from the cache. If it doesn’t the request is then sent to the database, and then returned to the client. The client will also write the data to the cache for the next request.

Pros:
1. Only requested data is cached
2. Node failures are not fatal

Cons:
1. Cache miss penalty means 3 round trips
2. Data in cache may be out of data (although eventually consistent) with DB

18
Q

What are the 2 ElastiCache strategies?

A
  1. Lazy loading/cache aside/lazy population
  2. Write through
19
Q

Describe the write through cache strategy and list 2 pros and 2 cons.

A

When data is written to the database, it is also written to the cache.

Pros:
1. Data in cache is never stale and reads are quick
2. Write penalty is longer than read penalty which users expect

Cons
1. Missing data in cache until the data is written to DB (can be mitigated using lazy loading)
2. Cache churn - lots of data is written to cache

20
Q

What are two ways to manage cache size?

A

Enforce cache eviction using
- Explicitly deleting items
- Evict items when memory is being filled based on lease recently used
- Set a time-to-live (TTL)

21
Q

What is MemoryDB for Redis? List 3 benefits.

A

Provides a redis-compatible, durable, in-memory database service. Benefits include:
1. Ultra-fast performance
2. Seamless scaling
3. Durable

22
Q

Which of the following RDS features when used does not require you to change the SQL connection string:
1. Read replicas
2. Multi-AZ

A

Multi-AZ