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
Q

What type of IP does NLB support?

A

Static IP or Elastic IP

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

What does the NLB do?

A

Forward TCP traffic to your instances

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

How many requests can an NLB handle per seconds?

A

Millions

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

What is the latency brought by a NLB

A

About 100 ms compared to 400 ms for ALBs

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

What are NLBs mostly used for?

A

Extreme performance (not be the default LB you choose)

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

What does the creation process of an NLB look like?

A

Pretty much the same as an ALB

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

What security feature do all ELB provide?

A

SSL certificates and SSL termination

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

Can LBs scale?

A

Yes but not instantly, contact AWS for โ€œwarm-upโ€ if you expect a sudden peak

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

What IP does the NLB sees?

A

The client IP

34
Q

What enduces 4xx errors?

A

The client

35
Q

What enduces 5xx errors?

What about 503?

A

The application

503 errors mean at capacity or no registered target

36
Q

What to do if the LB canโ€™t connect to your application?

A

Check the security groups

37
Q

How to make sure that a user can only access the application through an ELB?

A

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
Q

What can cause the โ€œ503 Service Temporarily Unavailableโ€ error?

A

The target group of an ELB contains no running EC2 instances

39
Q

What does ASG stand for?

A

Auto Scaling Group

40
Q

What is the purpose of the ASG?

A

Ensure we have a minimum and a maximum number of machines running

41
Q

How does an ASG achieve its purpose? (3 things)

A

By scaling out to match an increased load
By scaling in to match a decreased load
Automatically registering new instances to an ELB

42
Q

What does โ€œscale outโ€ mean?

A

Add EC2 instances

43
Q

What does โ€œscale inโ€ mean?

A

Remove EC2 instances

44
Q

What are the three variables that affect the number of running EC2 instances in an ASG?

A

Minimum size
Actual size (Desired Capacity)
Maximum size

45
Q

What attributes does an ASG have?

A
Launch Configuration
Min/Max/Initial Capacity
Scaling Policies
Load Balancer Information
Network + Subnet Information
46
Q

What does an ASG launch configuration contain? (6 things)

A
AMI
Instance Type
EC2 User Data
EBS Volume
Security Groups
SSH Key Pair
47
Q

What can trigger an ASG to change the number of running EC2 instances?

A

CloudWatch alarms that monitor a metric (Such as average CPU)
New Simple Auto Scaling Rules managed by EC2

48
Q

What are the new auto scaling rules managed by EC2?

A

Target average CPU usage
Number of request on the ELB per instance
Average network in
Average network out

49
Q

What is the benefit of using the new auto scaling rules managed by EC2?

A

They are simple easier to set up and can make more sense

50
Q

How to use custom metric for auto scaling?

A
  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
Q

What happens to IAM roles attached to ASGs?

A

They get assigned to the EC2 instances managed by the ASG

52
Q

How much $ are ASG?

A

FREE! You only pay for the underlying resources

53
Q

What does EBS stands for?

A

Elastic Block Store

54
Q

What happens to an EC2 instance root volume when it is manually terminated?

A

It gets deleted

55
Q

What is an EBS volume?

A

A network drive (not physical drive)

56
Q

What can an EBS volume be attached to?

A

A single EC2 instance

57
Q

How fast can an EBS be detached from an instance and attached to a new one?

A

Quickly

58
Q

On what level is an EBS locked?

A

Availability Zone (AZ)

59
Q

How to move a volume across another AZ?

A

By first making a snapshot of it

60
Q

What is the billing model of EBS volumes?

A

Provisioned (You get billed for all the provisioned capacity (GBs and IOPs)

61
Q

What does IOPs stands for?

A

Input/Output Operations Per Second

62
Q

What are the 4 types of EBS?

A

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
Q

Can you resize an EBS volume?

A

You can only increase the size and IOPs of an EBS volume

64
Q

What do you need to do after increasing the size of an EBS volume?

A

Repartition the drive

65
Q

How can you decrease the size of an EBS volume?

A

You first need to snaspshot the volume, then create a new smaller volume

66
Q

How can you backup an EBS volume?

A

By making a snapshot of it

67
Q

How much space does a snapshot take?

A

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
Q

What are snapshots used for?

A

Resizing a volume down
Changing the volume type
Encrypt a volume

69
Q

What is encrypted when using an encrypted EBS volume?

A

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
Q

How are encryption and decryption of EBS volumes handled?

A

Transparently

71
Q

How big is the impact of encryption on latency?

A

Minimal

72
Q

What keys does EBS encryption leverage?

A

Keys from KMS (AES-256)

73
Q

What does KMS (AES-256) stand for?

A

Key Management Service (Advanced Encryption Standard, blocks of 128 bits and key size of 256 bits)

74
Q

What are Instance Store?

A

Physically attached storage to the machine

75
Q

What is the main benefit of an Instance Store?

A

Better I/O performance

76
Q

What happens to the data in an Instance Store when the machine is terminated?

A

It is lost

77
Q

Can you resize the Instance Store?

A

No

78
Q

Who has to manage backups when it comes to Instance Store?

A

The user

79
Q

Can/should you backup EBS volumes while your application is handling a lot of traffic?

A

You should not, because EBS backups use IO

80
Q

By default, what happens to root EBS volumes attached to EC2 instances when the instance is terminatted?

A

They also get terminated (Data is lost)