Section 5: AWS Fundamentals: Route 53 + RDS + ElastiCache + VPC Flashcards

1
Q

What is Route53?

A

A managed DNS

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

In AWS, what are the 4 most common records?

What are their use case? ___ to ___

A

A: URL to IPv4
AAAA: URL to IPv6
CNAME: URL to URL
Alias: URL to AWS resource.

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

What is the preferred record for cross referencing AWS resources?

A

Alias

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

What type of domain can Route53 use

A

Public domains you own (or buy)

Private domains that can be resolved by your instances in your VPCs

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

What are some advanced features Route53 has?

A

Load balancing through DNS (also called client load balancing)
Health Checks (limited)
Routing policies

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

What are some routing policies which Route53 is able to handle?

A

simple, failover, geolocation, geoproximity, latency, weighted

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

What is AWS RDS?

A

A managed DB service for DB which use SQL as a query language

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

What DB can be created with AWS RDS?

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

Why use RDS rather than installing a DB on an EC2 instance?

A

Itโ€™s a managed service, which comes with those advantages:

  • OS Patching
  • Continuous backups and restore
  • Monitoring dashboards
  • Read replicas
  • Multi AZ
  • Maintenance windows
  • Scaling capability
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is one drawback of using RDS rather than an EC2?

A

You canโ€™t SSH into your instances

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

What are RDS Read Replicas used for?

A

Improving read scalability

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

How many Read Replicas can an RDS DB instance have?

A

Up to 5

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

What must the developer do to read from an RDS instance Read Replica?

A

Update the connection string (because the main connection string, which is used for writing to the DB, would also read from the main master DB)

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

What is the synchronicity of RDS DB replication to RDS DB Read Replica?

A

Asynchronous

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

What is the purpose of RDS Multi AZ

A

Disaster recovery

Not used for scaling

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

What must the developer do to start using RDS standby DB in case of disaster?

A

Nothing, the DNS name automatically points to the new DB instance if the main one fails

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

What is the synchronicity of RDS DB replication to RDS stand by DB (Multi AZ)?

A

Synchronous

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

What are automated RDS backups?

A

Daily full snapshot of the DB

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

When are RDS transaction logs captured?

A

In real time

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

With RDS backups, you can restore at what point in time?

A

Any, transaction logs are captured in real time

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

What is the default retention for automated RDS backups?

A

7 days

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

What is the maximum retention for RDS automated backups

A

35 days

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

What is the retention for manually triggered RDS DB Snapshots?

A

As long as you want

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

Is encryption available for AWS RDS?

A

Yes
At rest with AWS KMS (AWS-256)
In flight with SSL certificates

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

How to enforce SSL on Postgres?

A

By setting

rds.force_ssl=1 in the AWS RDS Console (Paratemer Groups)

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

How to enforce SSL on MySQL?

A

By running the following command in the DB:
ALTER USER โ€˜encrypted_userโ€™@โ€™%โ€™ REQUIRE SSL;
or
GRANT USAGE ON . TO โ€˜mysqluserโ€™@โ€™%โ€™ REQUIRE SSL;

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

How to connect to an RDS hosted DB with SSL?

A

Provide the SSL Trust certificate (can be downloaded from AWS)
Provide SSL options when connecting to database

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

In what type of subnet are RDS databases usually deployed?

A

Private

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

What does RDS Security leverages?

A

Security groups

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

What helps us define who can manage AWS RDS?

A

IAM policies

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

What is the traditional way to login to an RDS DB

A

With a username and password

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

What new alternative way now exists to connect to an RDS DB?

A

IAM users

34
Q

What is AWS Aurora

A

A proprietary technology from AWS

35
Q

How much faster is Aurora compared to MySQL on RDS and Postgres on RDS?

A

5x faster than MySQL

3x faster than Postgres

36
Q

In increments of what size does Aurora storage automatically grows, and up to what size?

A

Increments of 10GB, up to 64TB

37
Q

How many replicas can Aurora have? What about MySQL

A

Aurora: 15
MySQL: 5

38
Q

How long is the replication process for Aurora

A

10ms

39
Q

How fast is failover in Aurora?

A

Instantaneous

40
Q

How much more expensive is Aurora over other DB hosted on RDS?

A

20%, but itโ€™s more efficient

41
Q

What is AWS ElastiCache?

A

A managed service to setup a Redis or Memcached cache

42
Q

What are caches?

A

In-memory databases with really high performance and low latency

43
Q

What are the two main purposes of caches?

A

Reduce load of databases for rend intensive workloads

Make your application stateless (User session store)

44
Q

What do caches use for write scaling?

A

Sharding

45
Q

What do caches use for read scaling?

A

Read replicas

46
Q

What do caches use for failover capability? (Disaster recovery)

A

Multi AZ

47
Q

Why use ElastiCache rather than a custom cache set on an EC2 instance?

A

AWS takes care of maintenance, updates, optimisations, setup, monitoring, failure recovery and backups

48
Q

What does the cache need to have in order to make sure that only current data is present?

A

An invalidation strategy

49
Q

What does a DB cache provide?

A

A load relief in RDS

50
Q

How does a cache help with user sessions?

A
  1. User logs into any of the application instance
  2. Application store user session in the cache
  3. User hits another app instance
  4. Instance retrieves the user session from cache
51
Q

What are the two type of cache supported by ElastiCache

A

Redis and Memcached

52
Q

What is Redis?

A

An in-memory key-value store

53
Q

How fast is Redis?

A

VERY FAST! Super low latency (Sub ms)

54
Q

What happens to a Redis cache if the machine reboots?

A

The cache persists

55
Q

What is Redis good for?

A

Hosting user sessions, leaderboard (for gaming), distributed states, relieve pressure on databases, pub/sub capability for messaging

56
Q

Does Memcached survive reboots?

A

No

57
Q

What is Memcached?

A

An in-memory object store

58
Q

What is the most popular between Memcached and Redis?

A

Redis

59
Q

What is ElastiCache good for in general?

A

Read-heavy applications

Compute-intensive workloads

60
Q

What are two patterns/cache strategies for ElastiCache?

A

Lazy Loading

Write Through

61
Q

What is the lazy loading cache strategy for ElastiCache?

A
  1. Read request comes in
  2. App checks if ElastiCache has the desired value
  3. If not, app fetches the data from DB
  4. Stores the value in ElastiCache for further access
  5. Returns result to user
62
Q

What are the pros of the lazy loading cache strategy for ElastiCache?

A

Only requested data is in the cache

Node failures are not fatal

63
Q

What are the cons of the lazy loading cache strategy for ElastiCache?

A

Cache miss penalty in 3 round trips (noticeable delay)

There can be stale data if invalidation strategy for cache is bad or non-existent

64
Q

What is the write through cache strategy for ElastiCache?

A
  1. User post request
  2. App write to DB
  3. App write to cache
65
Q

What are the pros of the write through cache strategy for ElastiCache?

A

Data in cache is never stale

Write penalty is much smaller than the read penalty (much less noticeable)

66
Q

What are the cons of the write through cache strategy for ElastiCache?

A
Missing data until it's added/updated
Cache churn (a lot of data will never be read)
67
Q

How to mitigate the con of missing data when using the write through cache strategy for ElastiCache?

A

Using the lazy loading strategy as well

68
Q

What does VPC stand for?

A

Virtual Private Cloud

69
Q

What is a VPC scoped to?

A

A region and an AWS account

70
Q

What do VPCs contain?

A

Subnets

71
Q

What are subnets scoped to?

A

An AZ

72
Q

What are two types of subnets?

A

Public and private

73
Q

How many subnets are in an AZ?

A

As many as you want

74
Q

What is a subnet?

A

A logical subdivision of an IP network

75
Q

What do public subnets usually contain?

A

Load balancers
Static websites
Publicly accessible files
Public authentication layers

76
Q

What do private subnets usually contains?

A

Web application servers

Databases

77
Q

Can public and private subnets communicate?

A

Yes, if they are in the same VPC

78
Q

How to connect to a VPC and access all private IPs from your laptop?

A

By using a VPN

79
Q

How to monitor traffic within, in and out of your VPC?

A

By looking at the VPC Flow Logs

80
Q

What is a typical 3-tier Web App?

A

A web app with a facing load balancer whose IP is findable in a public subnet through an Alias record in Route 53. The LB distributes load to EC2 instances spread accross AZ and scalled on demand by an ASG in a private subnet. Those instances communicate with a cache and a DB which are both also in the default private subnet or another private subnet like โ€œdataโ€. All resources, both in public and private subnets are protected by security groups.