RDS + Aurora + ElastiCache Flashcards

1
Q

What is AWS RDS?

A

Relational Database Service.

Managed DB service w/ SQL as a query language. It allows you to create cloud databases managed by AWS.

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

What databases are supported by RDS?

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

What is RDS storage auto scaling?

A

Helps you increate RDS DB storage dynamically. When RDS detects you’re running out of free space, it scales automatically.

Avoids manually scaling your database storage.

Must set Maximum Storage Threshold. Helpful for apps with unpredictable workloads.

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

When will RDS automatically scale your storage?

A

When:

  1. free storage is less than 10% of allocated
  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
5
Q

What is RDS read replicas?

A

Helps you scale your reads. Apps must update the connection string to leverage read replicas.

You can have up to 5 replicas, either within AZ, cross AZ, or cross region.

Replication is ASYNC so reads are “eventually consistent”.

Replicas can be promoted to their own DB.

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

Describe situation when RDS read replicas might be useful

A

have a prod database, but need to run analytics on the database which would overload it.

instead - create read replica to run analytics against so it doesn’t overload prod

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

Do you pay network costs for creating RDS read replica in same region? Different region?

A

RDS replicas in same region - no fee
eg. us-east-1a -> us-east-1b = free

RDS replica in different region - fees for cross-region
eg. us-east-1a, eu-west-1b = not free

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

Can you set up RDS Read Replicas as multi-AZ for disaster recovery?

A

Yes. This can be done as synchronous replication. Acts as failover in case of loss of AZ, loss of network, or instance storage failure.

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

How do we make RDS database go from single AZ to multi AZ?

A

Just click on “modify” for the database, and enable “multi AZ”

this is a zero downtime operation

  • snapshot is taken
  • new db restored from snapshot in new az
  • synchronization is established between the two databases
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

True or false:

You can encrypt RDS read replicas, even if the master DB itself is not encrypted.

A

False.

If the master is not encrypted, the read replicas CANNOT be encrypted.

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

How do you encrypt an unencrypted RDS database?

A
  1. create snapshot of unencrypted db
  2. copy snapshot and enable encryption for the snapshot
  3. restore the db from encrypted snapshot
  4. migrate applications to the new db
  5. delete the old db
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is amazon Aurora?

A

proprietary technology from AWS that is cloud optimized, claims 5x performance improvement over mySQL on RDS, 3x performance of postgres

aurora storage automatically grows in increments of 10GB, up to 128TB

up to 15 replicas, and replication process is faster than mysql

failover in aurora is instantaneous

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

What is the writer endpoint and reader endpoint in an Aurora DB cluster?

A

The writer endpoint points to the master db.

The reader endpoint handles connection load balancing, and connects to the read replica DBs.

Read replicas can be auto scaling.

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

What AWS services support Aurora machine learning?

A
  1. Amazon SageMaker

2. Amazon Comprehend

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

Does ElastiCache support IAM authentication?

A

No. Elasticache does not support IAM auth.

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

Name and describe the 3 patterns for ElastiCache

A
  1. Lazy loading - all read data is cached, data becomes stale in cache
  2. Write through - adds or updates data in cache when written to DB (no stale data)
  3. Session store - store temporary session data in a cache (using TTL features)
17
Q

Gaming Leaderboard is a great use case for what AWS service?

A

ElastiCache - Redis

Redis sorted sets guarantee both uniqueness and element ordering. Each time a new element is added, it’s ranked in real time, then added in correct order.

18
Q

Amazon RDS supports the following databases, EXCEPT:

a. mongodb
b. mysql
c. mariadb
d. microsoft sql server

A

a. mongodb

RDS supports MySQL, PostgreSQL, MariaDB, Oracle, MS SQL Server, and Amazon Aurora.

19
Q

You’re planning for a new solution that requires a MySQL database that must be available even in case of a disaster in one of the Availability Zones.

What should you use?

A

Multi-AZ helps when you plan a disaster recovery for an entire AZ going down. If you plan against an entire AWS Region going down, you should use backups and replication across AWS Regions.

20
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?

a. an ElastiCache cluster
b. RDS multi-az
c. RDS read replicas

A

b. RDS multi-az

Be very careful with the way you read questions at the exam. Here, the question is asking which solution is NOT adapted to this problem. ElastiCache and RDS Read Replicas do indeed help with scaling reads.

21
Q

You have set up read replicas on your RDS database, but users are complaining that upon updating their social media posts, they do not see their updated posts right away.

What is a possible cause for this?

A

read replicas have async replication, therefore it’s likely your users will only read eventual consistency

22
Q

Which RDS (NOT Aurora) feature when used does not require you to change the SQL connection string?

a. multi-az
b. read replicas

A

a. multi-az

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

23
Q

Your application running on a fleet of EC2 instances managed by an Auto Scaling Group behind an Application Load Balancer. Users have to constantly log back in and you don’t want to enable Sticky Sessions on your ALB as you fear it will overload some EC2 instances.

What should you do?

A

Store session data in elasticache

Storing Session Data in ElastiCache is a common pattern to ensuring different EC2 instances can retrieve your user’s state if needed.

24
Q

An analytics application is currently performing its queries against your main production RDS database. These queries run at any time of the day and slow down the RDS database which impacts your users’ experience.

What should you do to improve the users’ experience?

A

set up a read replica

Read Replicas will help as your analytics application can now perform queries against it, and these queries won’t impact the main production RDS database.

25
Q

You would like to ensure you have a replica of your database available in another AWS Region if a disaster happens to your main AWS Region.

Which database do you recommend to implement this easily?

A

Aurora Global Databases allows you to have an Aurora Replica in another AWS Region, with up to 5 secondary regions.

26
Q

How can you enhance the security of your ElastiCache Redis Cluster by forcing users to enter a password when they connect?

A

using Redis Auth

27
Q

Your company has a production Node.js application that is using RDS MySQL 5.6 as its database. A new application programmed in Java will perform some heavy analytics workload to create a dashboard on a regular hourly basis.

What is the most cost-effective solution you can implement to minimize disruption for the main application?

A

create a read replica in a different AZ and run the analytics workload on the replica database

28
Q

You 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

29
Q

You have migrated the MySQL database from on-premises to RDS. You have a lot of applications and developers interacting with your database. Each developer has an IAM user in the company’s AWS account.

What is a suitable approach to give access to developers to the MySQL RDS DB instance instead of creating a DB user for each one?

A

enable IAM database authentication

30
Q

Do read replica and multi-az use async or synchronous replication?

A

Read replica uses async replication and Multi-AZ uses synchronous replication.

31
Q

How many read replicas can you have for your RDS database?

A

5

32
Q

Which RDS database technology does NOT support IAM Database Authentication?

Oracle
PostgreSQL
MySQL

A

Oracle

33
Q

You have an un-encrypted RDS DB instance and you want to create Read Replicas. Can you configure the RDS Read Replicas to be encrypted?

A

No. You can not create encrypted Read Replicas from an unencrypted RDS DB instance.

34
Q

An application running in production is using an Aurora Cluster as its database. Your development team would like to run a version of the application in a scaled-down application with the ability to perform some heavy workload on a need-basis. Most of the time, the application will be unused. Your CIO has tasked you with helping the team to achieve this while minimizing costs.

What do you suggest?

A

Use Aurora Serverless

35
Q

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

A

15

36
Q

What DBs does Aurora support?

A

MySQL and PostgreSQL

37
Q

You work as a Solutions Architect for a gaming company. One of the games mandates that players are ranked in real-time based on their score. Your boss asked you to design then implement an effective and highly available solution to create a gaming leaderboard.

What should you use?

A

Use ElasticCache for Redis - Sorted Sets