1
Q

What does ELB stand for?

A

Elastic Load Balancer (EC2 Load Balancer)

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

What are load balancers?

A

Servers that forward internet traffic to multiple servers (EC2 instances) downstream

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

How to access the application faced by a LB?

A

By using the DNS of the LB

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

What happens to the instances that crash / stop responding correctly?

A

They get terminated by the LB and the LB will then forward the traffic to other instances

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

How does the LB knows the health status of the instances?

A

By doing regular health checks to the instances

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

How does the LB help with security?

A

It provides SSL termination for your web apps and separate public traffic from private traffic

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

What is the benefit of using an ELB rather than a custom load balancer?

A

AWS guarantees that it will be working and handle updates and maintenance.
It is integretad with many AWS offerings

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

What are the three types of ELB?

A

Classic Load Balancer (CLB, deprecated)
Application Load Balancer (ALB)
Network Load Balancer (NLB)

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

How does an ELB perfom a health check on an instance?

A

It pings a port and a route (e.g. /health) and makes sure the response has a status of 200 (OK)

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

What protocol does the ALB serves?

A

HTTP, HTTPS, Websockets (Layer 7 - Application Layer)

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

What do ALB allow you to do?

A

Load balance to multiple HTTP applications across machines (target group)
Load balance to multiple applications on the same machine (containers)

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

On what parameters can an ALB load balance traffic on?

A

Route (e.g. /users)

Hostname (domain) (e.g example.com)

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

What are good use cases for ALB?

A

Micro services

Container based application (Docker & Amazon ECS)

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

What does ECS stand for?

A

Elastic Container Service

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

If we didnโ€™t have ALBs, how could we get the same result with the CLB?

A

We would need to create one CLB per application (expensive and inefficient)

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

What is a target group

A

A target group is a group of EC2 instances which are targetted by a LB.

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

At what level can stickiness be enabled?

A

Target group level

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

What does stickiness at the target group level mean?

A

Same request goes to the same instance

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

What generates the stickiness?

TG, ALB, ASG or app

A

The ALB (not the application)

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

What IP does the application server sees?

A

The private IP of the LB

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

How can the application server see the IP of the user?

A

By looking at the โ€œX-Forwarded-Forโ€ header of the request

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

How can the application server see the port and the proto when using an ALB?

A

By looking at the โ€œX-Forwarded-Portโ€ and โ€œX-Forwarded-Protoโ€ headers respectively

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

What does NLB stand for?

A

Network Load Balancer

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

What protocol does the NLB serves?

A

TCP, UDP, TLS (Layer 4 - Transport Layer)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What type of IP does NLB support?
Static IP or Elastic IP
26
What does the NLB do?
Forward TCP traffic to your instances
27
How many requests can an NLB handle per seconds?
Millions
28
What is the latency brought by a NLB
About 100 ms compared to 400 ms for ALBs
29
What are NLBs mostly used for?
Extreme performance (not be the default LB you choose)
30
What does the creation process of an NLB look like?
Pretty much the same as an ALB
31
What security feature do all ELB provide?
SSL certificates and SSL termination
32
Can LBs scale?
Yes but not instantly, contact AWS for "warm-up" if you expect a sudden peak
33
What IP does the NLB sees?
The client IP
34
What enduces 4xx errors?
The client
35
What enduces 5xx errors? | What about 503?
The application | 503 errors mean at capacity or no registered target
36
What to do if the LB can't connect to your application?
Check the security groups
37
How to make sure that a user can only access the application through an ELB?
By editing the security group attached to the application to only allow traffic on port 80 from the custom source sg-XXXXXX which is the sg attached to the LB.
38
What can cause the "503 Service Temporarily Unavailable" error?
The target group of an ELB contains no running EC2 instances
39
What does ASG stand for?
Auto Scaling Group
40
What is the purpose of the ASG?
Ensure we have a minimum and a maximum number of machines running
41
How does an ASG achieve its purpose? (3 things)
By scaling out to match an increased load By scaling in to match a decreased load Automatically registering new instances to an ELB
42
What does "scale out" mean?
Add EC2 instances
43
What does "scale in" mean?
Remove EC2 instances
44
What are the three variables that affect the number of running EC2 instances in an ASG?
Minimum size Actual size (Desired Capacity) Maximum size
45
What attributes does an ASG have?
``` Launch Configuration Min/Max/Initial Capacity Scaling Policies Load Balancer Information Network + Subnet Information ```
46
What does an ASG launch configuration contain? (6 things)
``` AMI Instance Type EC2 User Data EBS Volume Security Groups SSH Key Pair ```
47
What can trigger an ASG to change the number of running EC2 instances?
CloudWatch alarms that monitor a metric (Such as average CPU) New Simple Auto Scaling Rules managed by EC2
48
What are the new auto scaling rules managed by EC2?
Target average CPU usage Number of request on the ELB per instance Average network in Average network out
49
What is the benefit of using the new auto scaling rules managed by EC2?
They are simple easier to set up and can make more sense
50
How to use custom metric for auto scaling?
1. Send custom metric from app on EC2 to CloudWatch (PutMetric API) 2. Create CloudWatch alarm to react to low/high values 3. Use the CloudWatch alarm as the scaling policy for ASG
51
What happens to IAM roles attached to ASGs?
They get assigned to the EC2 instances managed by the ASG
52
How much $ are ASG?
FREE! You only pay for the underlying resources
53
What does EBS stands for?
Elastic Block Store
54
What happens to an EC2 instance root volume when it is manually terminated?
It gets deleted
55
What is an EBS volume?
A network drive (not physical drive)
56
What can an EBS volume be attached to?
A single EC2 instance
57
How fast can an EBS be detached from an instance and attached to a new one?
Quickly
58
On what level is an EBS locked?
Availability Zone (AZ)
59
How to move a volume across another AZ?
By first making a snapshot of it
60
What is the billing model of EBS volumes?
Provisioned (You get billed for all the provisioned capacity (GBs and IOPs)
61
What does IOPs stands for?
Input/Output Operations Per Second
62
What are the 4 types of EBS?
GP2 (SSD) Great Value - General Purpose IO1 (SSD) Highest Cost - Highest performance ST1 (HDD) Low Cost - Designed for frequent access SC1 (HDD) Lowest Cost - Designed for low frequency
63
Can you resize an EBS volume?
You can only increase the size and IOPs of an EBS volume
64
What do you need to do after increasing the size of an EBS volume?
Repartition the drive
65
How can you decrease the size of an EBS volume?
You first need to snaspshot the volume, then create a new smaller volume
66
How can you backup an EBS volume?
By making a snapshot of it
67
How much space does a snapshot take?
The space that the data occupied in the EBS volume (E.g. A snapshot of a 100GB EBS volume which contained 5 GB of data would weigth 5GB)
68
What are snapshots used for?
Resizing a volume down Changing the volume type Encrypt a volume
69
What is encrypted when using an encrypted EBS volume?
Data is encrypted at rest (on the volume) Data is encrypted in flight (between the instances and the volume) Data is encrypted in snapshots Volumes created from snapshots are also encrypted
70
How are encryption and decryption of EBS volumes handled?
Transparently
71
How big is the impact of encryption on latency?
Minimal
72
What keys does EBS encryption leverage?
Keys from KMS (AES-256)
73
What does KMS (AES-256) stand for?
Key Management Service (Advanced Encryption Standard, blocks of 128 bits and key size of 256 bits)
74
What are Instance Store?
Physically attached storage to the machine
75
What is the main benefit of an Instance Store?
Better I/O performance
76
What happens to the data in an Instance Store when the machine is terminated?
It is lost
77
Can you resize the Instance Store?
No
78
Who has to manage backups when it comes to Instance Store?
The user
79
Can/should you backup EBS volumes while your application is handling a lot of traffic?
You should not, because EBS backups use IO
80
By default, what happens to root EBS volumes attached to EC2 instances when the instance is terminatted?
They also get terminated (Data is lost)