High Availability & Scalability: ELB & ASG Flashcards

1
Q

An application/system can handle greater loads by adapting

A

Scalability

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

What are two types of scalability

A

Vertical

Horizontal (elasticity)

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

Vertical Scalability means..

A

Increasing the size of an instance

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

Horizontal scalability means..

A

Increasing the # of instances/systems for your application

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

Horizontal scaling implies what?

A

Distributed systems

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

What is the goal of High Availability?

A

To survive a data center loss

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

Scale up/down

A

Vertical Scaling

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

Scale in/out

A

Horizontal Scaling

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

Run instances for the same application across multi AZ

A

High Availability

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

A server that will forward traffic to multiple servers (e.g., instances) downstream

A

Load Balancing

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

Which is easier to use ELB or LB & why?

A

ELB because it’s managed by AWS & cost less

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

A way for your ELB to verify if your EC2 Instance is properly working?

A

Health Checks

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

The health check is done on a what? (2)

A

Port and a route

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

If the response is not (blank), then the instance is unhealthy

A

200

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

Health Checks are crucial for..

A

Load Balancers

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

Name the four types of Load Balancers

A

Classic LB
Application LB
Network LB
Gateway LB

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

Which Load Balancer is deprecated?

A

CLB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q
  • Supports TCP (Layer 4), HTTP & HTTPS (Layer 7)
  • Health checks are TCP or HTTP based
  • Fixed host name XXX.región.elb.amazonaws.com

What LB type is this?

A

CLB

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

Due to AWS changes, instead of modifying the rule, you must

A

1) Delete existing HTTP rule

2) Create a new rule with the ‘source’ being the CLB security group

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q
  • Load balancing to multiple HTTP applications across machines (target groups)
  • Load balancing to multiple applications on the same machine (ex. Containers)
  • Support for HTTP/2 & WebSocket
  • Support redirects (from HTTP to HTTPS for example)

What LB type is this?

A

ALB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q
  • Great fit for micro services & container based application (ex. Docket & Amazon ECS)
  • Has a port mapping feature to redirect to a dynamic port in ECS

What LB type is this?

A

ALB

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

What are NLBs used for?

A

Extreme Performance
TCP
UDP traffic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q
  • Layer 4
  • Forward TCP & UDP traffic to your instances
  • Less latency ~ 100 ms
  • Has one static IP per AZ
  • Supports assigning Elastic IP (helpful for whitelisting)

What LB type is this?

A

NLB

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

What does TCP stand for?

A

Transmission Control Protocol

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
A communications standard that enables application programs and computing devices to exchange messages over a network
TCP
26
A communication protocol used across the Internet for especially time-sensitive transmissions such as video playback or DNS lookups.
UDP
27
What does UDP stand for?
User Datagram Protocol
28
* Deploy, scale, and manage a fleet of 3rd party network virtual appliances in AWS * Firewalls, Intrusion Detection and Prevention Systems, Deep Packet Inspection Systems, payload manipulation * Operates at Layer 3 (Network Layer) - IP Packets What LB type is this?
Gateway LB
29
Uses the GENEVE protocol on port 6081 What LB is this?
Gateway
30
Single entry/exit for all traffic
Transparent Network Gateway
31
Stickiness works for which LBs?
ALB & CLB
32
What is the use case for sticky sessions?
Make sure the user doesn’t lose his session data
33
The same client is always redirected to the same instance behind a load balancer What is this called?
Sticky sessions
34
Name the two types of cookies
Application & Duration based
35
The (blank) is designed to remember information about you, including a record of your website visits and activity
Cookie
36
Why do websites use cookies?
1. To recognise your pc 2. To tailor the website experience to you 3. To track your activity as you navigate the website 4. To analyze your use of the website 5. To enhance the websites usability
37
What is Application-based Cookie name?
AWSALBAPP
38
What is Duration-based Cookie name?
AWSALB for ALB AWSELB for CLB
39
Each LB instance distributes evenly across all registered instances in all AZ
Cross Zone Load Balancing
40
Requests are distributed in the instances of the node of the Elastic Load Balancer
Without Cross Zone Load Balancing
41
* CZLB always on (can’t be disabled) * No charges for inter AZ data Which LB is this?
ALB
42
* CZLB is disabled by default * You pay charges for Inter AZ data if enabled Which LB is this?
NLB
43
* CZLB is disabled by default * No charges for inter AZ data if enabled Which LB is this?
CLB
44
Allows traffic between your clients and your load balancer to be encrypted in transit (in-flight encryption)
SSL certificate
45
What is the newer version of SSL?
TLS (Transport Layer Security)
46
What does SSL stand for?
Secure Sockets Layer
47
What is SSL used for?
To encrypt connections
48
(Blank) certificates are mainly used
TLS
49
What solves the problem of loading multiple SSL certificates onto one web server?
SNI (Server Name Indication)
50
Does CLB support SNI?
No (it’s deprecated)
51
What does ALB & NLB support? (2)
SNI & multiple SSL certificates
52
Will give time to complete “in-flight requests” while the instance is de-registering or unhealthy
Connection Draining
53
* Scale out (add EC2 instances) to match an increased load * Scale in (remove EC2 instances) to match decreased load * Ensure we have a minimum and maximum # of machines running * Automatically Register new instances to a load balancer What is this feature called?
Auto Scaling Group (ASG)
54
Having instances under an ASG means that if they get terminated for whatever reason, the ASG will automatically what?
Create new ones as a replacement
55
Are ASG free?
Yes
56
IAM roles attached to an ASG will get assigned to ..
EC2 instances
57
ASG will try to balance the (blank) of instances across (blank) by default
Number; AZ
58
You have the ability to perform extra steps before the instance goes in service (Pending state)
Lifecycle Hooks
59
You have the ability to perform some actions before the instance is terminated (Terminating state)
Lifecycle Hooks
60
What does AWS recommend, Launch Configuration or Launch Template?
Launch Template
61
1. Find the AZ which has the most # of instances 2. If there are multiple instances in the AZ to choose from, delete the one w the oldest configuration What is this process called?
ASG Default Termination Policy
62
* Most simple and easy to set up * Ex: I want the average ASG CPU to stay at around 40% Which Dynamic Scaling Policy is this?
Target Tracking Scaling
63
* When a CloudWatch alarm is triggered, then add 2 units * When a CloudWatch alarm is triggered, then remove 1 Which Dynamic Scaling Policy is this?
Simple/Step Scaling
64
* Anticipate a scaling based on known usage patterns * Ex: increase the min capacity to 10 at 1700 on Friday’s Which Dynamic Scaling Policy is this?
Scheduled Actions
65
Continuously forecast load and schedule scaling ahead Which ASG type is this?
Predictive Scaling | think this the future because it is machine learning powered & it’s a hands off approach to scaling your ASG
66
What are good metrics to scale on?
CPUUtilization RequestCountPerTarget Average Network In/Out (if application is network bound) Any custom metric
67
Cool down period by default is how long?
300 seconds (5 min)
68
During the cool down period what happens?
The ASG will not launch or terminate additional instances
69
Scaling an EC2 instance from r4.large to r4.4xlarge is called what?
Vertical Scalability
70
Elastic Load Balancers provide a static what?
DNS name
71
To get the client’s IP address, ALB adds an additional header called what?
X-Forwarded-For
72
What feature won’t send traffic to unhealthy (crashed) EC2 instances?
Health checks
73
Which LB provides the highest performance and lowest latency?
Network Load Balancer
74
Application Load Balancers supports which protocols?
HTTP HTTPS WebSocket
75
ALBs can route traffic to different Target Groups based on what?
URL Path Hostname HTTP Headers Query Strings
76
Which type of Elastic Load Balancer has one static IP address per AZ?
Network Load Balancer
77
Which cookie names are reserved by the ELB?
AWSALB AWSALBAPP AWSALBTG
78
Which feature in both ALB & NLB allows you to load multiple SSL certificates on one listener?
Server Name Indication (SNI)
79
What allows you to expose multiple HTTPS applications each with its own SSL certificate on the same listener
Server Name Indication (SNI)
80
Can the ASG go over the maximum capacity (you configured) during scale-out events?
No
81
When an EC2 instance fails the ALB Health Checks what happens?
The ASG will terminate the EC2 instance
82
What does 0.0.0.0/0 mean?
All possible IP addresses
83
Referencing by (blank) in rules is an extremely powerful rule.
Security Groups
84
The Default Termination Policy for ASG is what?
1. Find the AZ which has the MOST instances | 2. Terminate based on OLDEST Launch Template
85
Which LBs have a static DNS name?
ALB & CLB