RDS Flashcards

1
Q

What are the 6 Databases that AWS manages?

A
  • Postgres
  • MySQL
  • MariaDB
  • Oracle
  • Microsoft SQL Server
  • Aurora (AWS Proprietary DB)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Can Read Replicas be set up as Multi AZ for Disaster Recovery (DR)

A

Yes

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

Do Read Replicas cost money for ASYNC replication across Multi AZs

A
  • Yes - it is expensive for read replicas to work across multi AZs.
  • It is FREE if read replicas are in the same AZ
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

T/F - Read Replicas, Reads as eventually consistent

A

TRUE

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

What are the type of RDS Encryption

A
  • At rest encryption - encryption must be defined at launch time
  • In-flight encryption - SSL certificates to encrypt data to RDS in flight
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

RDS - what management aspects are you responsible for?

A
  • Check the ports / IP / security group inbound rules in SG DB
  • In-database user creation and permissions or manage through IAM
  • Creating a DB with or without public access
  • Ensure parameter groups or DB is configured to only allow SSL connections
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

RDS - what management aspects is AWS responsible for?

A
  • Not allow SSH access into DB Instance
  • DB Patching
  • OS Patching
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the advantages of using RDS verses deploying on EC2?

A
  • RDS is a managed service
  • Automated provisioning
  • OS Patching
  • Monitoring dashboards
  • Read replicas available for improved performance
  • Multi AZ setup for disaster recovery
  • Scaling capabilities
  • Storage backed by EBS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Can you SSH into an AWS RDS instance?

A

NO

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

How many Read replicas can you have for RDS?

A

Up to 5

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

Describe at rest encryption for RDS instantances

A
  • Can be encrypted with AWS KMS AES-256
  • Encryption must be defined at launch time
  • If master is not encrypted read replicas can not be encrypted
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Describe in-flight encryption for RDS instances

A

SSL certs are required to encrypt data to RDS in flight

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

How would you encrypt an un-encrypted RDS database?

A
  • Create a snapshot of the un-encrypted db
  • Copy the snapshot and enable encryption for the snapshot
  • Restore the DB from the newly encrypted snapshot
  • Migrate application to the new db, and delete the old db
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Describe main features of Aurora DB

A
  • Automatic fail-over
  • Backup and recovery
  • Isolation and security
  • Industry compliance
  • Push button scaling
  • Automated patching with zero downtime
  • Advanced monitoring
  • Routine maintenance
  • Backtrack: restore data at any point of time w/o using backups
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Describe Aurora DBS secuirty

A
  • Similar to RDS - uses same engines
  • Encryption at rest using KMS
  • Automated backups, snapshots and replicas are also encrypted
  • Encryption in flight using SSL
  • Possibility to authenticate using IAM token (same in RDS)
  • You are responsible for protecting the instance with security groups
  • You can NOT SSH
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a good use case for Aurora Serverless?

A

Infrequent, intermittent or unpredictable workloads

17
Q

What is Elasticache?

A
  • In-memory databases with really high performance, low latency
  • Helps reduce load off of databases for read intensive workloads
  • Helps make your application stateless
  • Redis or Memcached = options
  • Involves heavy application code changes
18
Q

Redis vs Memcached?

A

Redis:

  • Multi AZ with auto-failover
  • Read replicas to scale reads and have high availability
  • Data durability using AOF persistance
  • Backup and restore features

Memcached

  • Using something called Sharding (multi node partitioning)
  • NON persistent
  • No backup and restore
  • Multi- threaded architecture
19
Q

What is lazy loading as it relates to Elasticache?

A
  • AKA Cache-Aside or Lazy Population
  • Application first makes a call to the cache. If its a cache hit, data is returned.
  • If its a cache miss, another call is made to the DB, data is return to the application, then data is written to cache
20
Q

What are the pros and cons of data caching / lazy loading ?

A

Pros:

  • Only requested data is cached
  • Node failures are not fatal to the application health

Cons:

  • Cache miss = 3 round trips = delay for user
  • Possible statle data
21
Q

Which RDS Class (not Aurora) feature does not require us to change our connection string?

A
  • Multi AZ
  • Read Replicas add new endpoints for databases to read from and therefore we must change our application to have the list of these endpoints in order to balance the read load and connect to the databases
22
Q

You want to ensure your Redis cluster will always be available, which do you enable: read replicas or multi-az

A

Multi - AZ

23
Q

Which database does NOT support Transparent Data Encrytion (TDE) on RDS?

A

PostgresSQL

24
Q

Which RDS database technology does NOT support IAM authentication?

A

Oracle

Remeber that both MySQL and PG are Aurora compatible and that Aurora DOES allow for IAM authentication.

25
Q

You would like to ensure you have a database available in another region if a disaster happens to your main region. Which database do you recommend?

A

Aurora Global DB

Global Databases allow you to have cross region replication

26
Q

Your organization wants to enforce SSL connections on your MySQL database

A

Apply a ‘REQUIRE SSL’ statement to all your users in your SQL DB

27
Q

Name the 3 main caching stratigies

A
  • lazy-loading / cache - aside / lazy population
  • write-through
  • TTL
28
Q

Describe write-through elasticache strategy

A
  • Add or update cache when db is updated
  • When the application makes a write to the RDS, the app will make a second write to the cache

Pros:

  • Data in cache is never stale, reads are very quick

Cons:

  • Missing data until data is added / updated
  • To mitigate this you can implement lazy loading in addition to the write-through strategy
29
Q

Describe the TTL (Time-to-Live) Elasticache strategy

A

Cache is deleted after a certain time period (seconds to days)

Deletion can occur in 3 main ways:

  • Its deleted explicity
  • deleted because memory is full and that data has not recently been used
  • you set an item to TTL (to live for a specific time period)
30
Q

You are serving web pages for a very dynamic website and you have a requirement to keep latency to a minimum for every single user when they do a read request. Writes can take longer to happen. Which caching strategy do you recommend?

A

write-through