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
Is encryption available for AWS RDS?
Yes At rest with AWS KMS (AWS-256) In flight with SSL certificates
26
How to enforce SSL on Postgres?
By setting | rds.force_ssl=1 in the AWS RDS Console (Paratemer Groups)
27
How to enforce SSL on MySQL?
By running the following command in the DB: ALTER USER 'encrypted_user'@'%' REQUIRE SSL; or GRANT USAGE ON *.* TO 'mysqluser'@'%' REQUIRE SSL;
28
How to connect to an RDS hosted DB with SSL?
Provide the SSL Trust certificate (can be downloaded from AWS) Provide SSL options when connecting to database
29
In what type of subnet are RDS databases usually deployed?
Private
30
What does RDS Security leverages?
Security groups
31
What helps us define who can manage AWS RDS?
IAM policies
32
What is the traditional way to login to an RDS DB
With a username and password
33
What new alternative way now exists to connect to an RDS DB?
IAM users
34
What is AWS Aurora
A proprietary technology from AWS
35
How much faster is Aurora compared to MySQL on RDS and Postgres on RDS?
5x faster than MySQL | 3x faster than Postgres
36
In increments of what size does Aurora storage automatically grows, and up to what size?
Increments of 10GB, up to 64TB
37
How many replicas can Aurora have? What about MySQL
Aurora: 15 MySQL: 5
38
How long is the replication process for Aurora
10ms
39
How fast is failover in Aurora?
Instantaneous
40
How much more expensive is Aurora over other DB hosted on RDS?
20%, but it's more efficient
41
What is AWS ElastiCache?
A managed service to setup a Redis or Memcached cache
42
What are caches?
In-memory databases with really high performance and low latency
43
What are the two main purposes of caches?
Reduce load of databases for rend intensive workloads | Make your application stateless (User session store)
44
What do caches use for write scaling?
Sharding
45
What do caches use for read scaling?
Read replicas
46
What do caches use for failover capability? (Disaster recovery)
Multi AZ
47
Why use ElastiCache rather than a custom cache set on an EC2 instance?
AWS takes care of maintenance, updates, optimisations, setup, monitoring, failure recovery and backups
48
What does the cache need to have in order to make sure that only current data is present?
An invalidation strategy
49
What does a DB cache provide?
A load relief in RDS
50
How does a cache help with user sessions?
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
What are the two type of cache supported by ElastiCache
Redis and Memcached
52
What is Redis?
An in-memory key-value store
53
How fast is Redis?
VERY FAST! Super low latency (Sub ms)
54
What happens to a Redis cache if the machine reboots?
The cache persists
55
What is Redis good for?
Hosting user sessions, leaderboard (for gaming), distributed states, relieve pressure on databases, pub/sub capability for messaging
56
Does Memcached survive reboots?
No
57
What is Memcached?
An in-memory object store
58
What is the most popular between Memcached and Redis?
Redis
59
What is ElastiCache good for in general?
Read-heavy applications | Compute-intensive workloads
60
What are two patterns/cache strategies for ElastiCache?
Lazy Loading | Write Through
61
What is the lazy loading cache strategy for ElastiCache?
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
What are the pros of the lazy loading cache strategy for ElastiCache?
Only requested data is in the cache | Node failures are not fatal
63
What are the cons of the lazy loading cache strategy for ElastiCache?
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
What is the write through cache strategy for ElastiCache?
1. User post request 2. App write to DB 3. App write to cache
65
What are the pros of the write through cache strategy for ElastiCache?
Data in cache is never stale | Write penalty is much smaller than the read penalty (much less noticeable)
66
What are the cons of the write through cache strategy for ElastiCache?
``` Missing data until it's added/updated Cache churn (a lot of data will never be read) ```
67
How to mitigate the con of missing data when using the write through cache strategy for ElastiCache?
Using the lazy loading strategy as well
68
What does VPC stand for?
Virtual Private Cloud
69
What is a VPC scoped to?
A region and an AWS account
70
What do VPCs contain?
Subnets
71
What are subnets scoped to?
An AZ
72
What are two types of subnets?
Public and private
73
How many subnets are in an AZ?
As many as you want
74
What is a subnet?
A logical subdivision of an IP network
75
What do public subnets usually contain?
Load balancers Static websites Publicly accessible files Public authentication layers
76
What do private subnets usually contains?
Web application servers | Databases
77
Can public and private subnets communicate?
Yes, if they are in the same VPC
78
How to connect to a VPC and access all private IPs from your laptop?
By using a VPN
79
How to monitor traffic within, in and out of your VPC?
By looking at the VPC Flow Logs
80
What is a typical 3-tier Web App?
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.