AWS Fundamentals: RDS + Aurora + ElastiCache Flashcards

1
Q

What is RDS?

A

Relational Database Service is a managed DB service for DB use SQL as a query language.

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

What does RDS do?

A

It allows creating databases in the cloud that are managed by AWS

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

Two ways of deploying a database:

A

RDS & using an EC2

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

Features:
- Automated provisioning, OS patching
- Continuous backups and restore to specific timestamp (Point in Time Restore)!
- Monitoring dashboards
- Read replicas for improved read performance
- Multi AZ setup for DR (Disaster Recovery)
- Maintenance windows for upgrades
- Scaling capability (vertical and horizontal)
- Storage backed by EBS (gp2 or io1)

A

RDS

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

RDS is a ……., but you can’t ….. into your instances.

A

managed service, SHH

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

What helps you increase storage on your DB instance
dynamically?

A

RDS - storage auto scaling

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

If using “storage auto scaling” you need to set:

A

Maximum Storage Threshold (maximum limit for DB storage)

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

RDS Automatically modify storage if:

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

RDS storage auto scaling is useful for:

A

Applications with unpredictable workloads

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

What is a read replica?

A

Helps scale reads.

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

Up to …. read replicas.

A

15

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

Within……, ……… or ………. is ASYNC, so reads are eventually…………..

A

AZ, Cross AZ, Replication, consistent

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

Replicas can be promoted to their own DB?

A

True

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

How can applications leverage read replicas?

A

They must update the connection string.

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

What are statements are read replicas used for?

A

SELECT

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

What are statements are read replicas NOT used for?

A

INSERT, UPDATE, DELETE

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

In AWS there’s a …… when data goes from one AZ to another

A

network cost

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

RDS Read Replicas within the same region, don’t pay network cost fee?

A

True

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

What is RDS Multi AZ mainly used for?

A

Disaster Recovery

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

How does RDS Multi AZ work?

A

With sync replication it writes to a RDS instance on standby in a different AZ

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

RDS communicates over one DNS name?

A

True

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

Features:
- increase availability
- Failover in case of loss of AZ, loss of network, instance or storage failure
- No manual intervention in apps
- Not used for scaling

A

RDS Multi AZ

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

The Read Replicas can be setup as Multi AZ for Disaster Recovery?

A

True

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

How do you change from Single-AZ to Multi-AZ?

A

Click on “modify” for the database and enable multi-az.

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

Is there downtown when changing from single to multi AZ?

A

No downtime.

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

What are the steps taken to change from single to multi AZ?

A
  • A snapshot is taken
  • A new DB is restored from the
    snapshot in a new AZ
  • Synchronization is established
    between the two databases
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What is Auroa?

A

Aurora is a proprietary technology from AWS

28
Q

………….. and ………. are both supported as Aurora DB

A

Postgres, MySQL

29
Q

At-rest encryption:
How are Database master & replicas encrypted?

A

AWS KMS – must be defined as launch time

30
Q

At-rest encryption:
If the master is not encrypted…..

A

the read replicas cannot be encrypted

31
Q

At-rest encryption:
How do you encrypt an un-encrypted database?

A

go through a DB snapshot & restore as encrypted

32
Q

What is at-rest encryption?

A

This when data is encrypted on the volumes.

33
Q

What is in-flight encryption?

A

When data is encrypted between client and database.

34
Q

How do is In-flight encryption enabled?

A

Clients must use the TLS root certificates from AWS. AWSTLS root certificates

35
Q

How can you connect to your database?

A

IAM Authentication: IAM roles to connect to your database (instead of username/pw)

Security Groups: Control Network access to your RDS / Aurora DB

36
Q

No ….. available except on RDS Custom

A

SSH

37
Q

What is Amazon RDS Proxy?

A

Fully managed database proxy for RDS

38
Q

What does Amazon RDS Proxy do?

A

Allows apps to pool and share DB connections established with the database

39
Q

What does Amazon RDS Proxy accomplish?

A

Improves database efficiency by reducing the stress on database resources (e.g., CPU, RAM) and minimize open connections (and timeouts)

40
Q

What is RDS service is: Serverless, autoscaling, highly available (multi-AZ)

A

Amazon RDS Proxy

41
Q

What does RDS Proxy enforce?

A

IAM authentication for your database. Makes sure that people can only connect to your RDS database instance using IAM.

42
Q

How can you access RDS Proxy?

A

Never publicly accessible - must be accessed from VPC

43
Q

What is ElastiCache for?

A

It is to get managed Redis or Memcached

44
Q

What are caches?

A

Caches are in-memory databases with really high performance, low latency

45
Q

What is the purpose of a cache?

A

Helps reduce load off of databases for read intensive workloads

46
Q

What does a cache make your appication?

A

Helps make your application stateless

47
Q

Two kinds of “solutions architecture” for caching?

A

DB Cache & User Session Store

48
Q

How does DB Cache work?

A

Applications queries ElastiCache, if not available, get from RDS and store in ElastiCache.

49
Q

What kind of strategy should be implemented along with a DB cache system?

A

Cache must have an invalidation strategy to make sure only the most current data is used in there.

50
Q

How does User Session Store work?

A
  • User logs into any of the application
  • The application writes the session data into ElastiCache
  • The user hits another instance of our application(Amazon Elastic cache…i think)
  • The instance retrieves the data and the user is already logged in
51
Q

Features:
- Multi-AZ with auto failover
- Read Replicas to scale reads and have high availability
- Data durability using AOF persistence
- Supports Sets and Sorted Sets

A

REDIS

52
Q

Features:
- Multi-node for partitioning of data (sharding)
- No high availability (replication)
- Non persistent
- No backup and restore
- Multi-threaded architecture

A

MEMCAHCED

53
Q

Caching strategies:

A
  1. Lazy Loading/ Cache-Aside/ Lazy Population
  2. Write Through - Add or Update cache when database is updated
  3. Cache Evictions and Time-to-live (TTL)
54
Q

Lazy Loading/ Cache-Aside/ Lazy Population, Pros:

A
  • Only requested data is cached (the cache isn’t filled up with unused data)
  • Node failures are not fatal (just increased latency to warm the cache)
55
Q

Lazy Loading/ Cache-Aside/ Lazy Population, Cons:

A
  • Cache miss penalty that results in 3 round trips, noticeable delay for that request
  • Stale data: data can be updated in the database and outdated in the cache
56
Q

Write Through - Add or Update cache when database is updated, Pros:

A
  • Data in cache is never stale, reads are quick
  • Write penalty vs Read penalty (each write requires 2 calls)
57
Q

Write Through - Add or Update cache when database is updated, Cons:

A
  • Missing Data until it is added / updated in the DB. Mitigation is to implement Lazy Loading strategy as well
  • Cache churn – a lot of the data will never be read
58
Q

Which caching strategy does this describe:

First, if cache has something - Cache hit.

If there is no Cache hit, it’s called a Cache miss.

So we go and read the data from your database, then write that data to the cache to make sure other application that requests the same data will go directly into Cache hit.

A

Lazy Loading/ Cache-Aside/ Lazy Population

59
Q

Which caching strategy does this describe:
When our application talks to ElastiCache and we get a Cache hit there is a write happening to RDS, so when our application modifies the Amazon RDS database, it’s going to write to the cache. It writes through the cache to the RDS

A

Write Through - Add or Update cache when database is updated

60
Q

Cache eviction can occur in three ways:

A
  • You delete the item explicitly in the cache
  • Item is evicted because the memory is full and it’s not recently used (LRU: Lest Recently Used)
  • You set an item time-to-live (or TTL)
61
Q

TTL are helpful to manage what kind of data:

A
  • Leaderboards
  • Comments
  • Activity streams
62
Q

……………./………….. is easy to implement and works for many situations as a…………, especially on the…….. side

A

Lazy Loading / Cache aside, foundation, read

63
Q

………. is usually combined with …………… as targeted for the queries or workloads that benefit from this optimization( …… ,the go to solution)

A

Write-through, Lazy Loading, Not

64
Q

Setting a ……. is usually not a bad idea, except when you’re using ……… Set it to a sensible value for your application

A

TTL, Write- through

65
Q

Only….. the data that makes sense (user profiles, blogs, etc…)

A

cache