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
Q

A communications standard that enables application programs and computing devices to exchange messages over a network

A

TCP

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

A communication protocol used across the Internet for especially time-sensitive transmissions such as video playback or DNS lookups.

A

UDP

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

What does UDP stand for?

A

User Datagram Protocol

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

A

Gateway LB

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

Uses the GENEVE protocol on port 6081

What LB is this?

A

Gateway

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

Single entry/exit for all traffic

A

Transparent Network Gateway

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

Stickiness works for which LBs?

A

ALB & CLB

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

What is the use case for sticky sessions?

A

Make sure the user doesn’t lose his session data

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

The same client is always redirected to the same instance behind a load balancer

What is this called?

A

Sticky sessions

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

Name the two types of cookies

A

Application & Duration based

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

The (blank) is designed to remember information about you, including a record of your website visits and activity

A

Cookie

36
Q

Why do websites use cookies?

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

What is Application-based Cookie name?

A

AWSALBAPP

38
Q

What is Duration-based Cookie name?

A

AWSALB for ALB

AWSELB for CLB

39
Q

Each LB instance distributes evenly across all registered instances in all AZ

A

Cross Zone Load Balancing

40
Q

Requests are distributed in the instances of the node of the Elastic Load Balancer

A

Without Cross Zone Load Balancing

41
Q
  • CZLB always on (can’t be disabled)
  • No charges for inter AZ data

Which LB is this?

A

ALB

42
Q
  • CZLB is disabled by default
  • You pay charges for Inter AZ data if enabled

Which LB is this?

A

NLB

43
Q
  • CZLB is disabled by default
  • No charges for inter AZ data if enabled

Which LB is this?

A

CLB

44
Q

Allows traffic between your clients and your load balancer to be encrypted in transit (in-flight encryption)

A

SSL certificate

45
Q

What is the newer version of SSL?

A

TLS (Transport Layer Security)

46
Q

What does SSL stand for?

A

Secure Sockets Layer

47
Q

What is SSL used for?

A

To encrypt connections

48
Q

(Blank) certificates are mainly used

A

TLS

49
Q

What solves the problem of loading multiple SSL certificates onto one web server?

A

SNI (Server Name Indication)

50
Q

Does CLB support SNI?

A

No (it’s deprecated)

51
Q

What does ALB & NLB support? (2)

A

SNI & multiple SSL certificates

52
Q

Will give time to complete “in-flight requests” while the instance is de-registering or unhealthy

A

Connection Draining

53
Q
  • 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?

A

Auto Scaling Group (ASG)

54
Q

Having instances under an ASG means that if they get terminated for whatever reason, the ASG will automatically what?

A

Create new ones as a replacement

55
Q

Are ASG free?

A

Yes

56
Q

IAM roles attached to an ASG will get assigned to ..

A

EC2 instances

57
Q

ASG will try to balance the (blank) of instances across (blank) by default

A

Number; AZ

58
Q

You have the ability to perform extra steps before the instance goes in service (Pending state)

A

Lifecycle Hooks

59
Q

You have the ability to perform some actions before the instance is terminated (Terminating state)

A

Lifecycle Hooks

60
Q

What does AWS recommend, Launch Configuration or Launch Template?

A

Launch Template

61
Q
  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?

A

ASG Default Termination Policy

62
Q
  • 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?

A

Target Tracking Scaling

63
Q
  • 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?

A

Simple/Step Scaling

64
Q
  • 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?

A

Scheduled Actions

65
Q

Continuously forecast load and schedule scaling ahead

Which ASG type is this?

A

Predictive Scaling

think this the future because it is machine learning powered & it’s a hands off approach to scaling your ASG

66
Q

What are good metrics to scale on?

A

CPUUtilization

RequestCountPerTarget

Average Network In/Out (if application is network bound)

Any custom metric

67
Q

Cool down period by default is how long?

A

300 seconds (5 min)

68
Q

During the cool down period what happens?

A

The ASG will not launch or terminate additional instances

69
Q

Scaling an EC2 instance from r4.large to r4.4xlarge is called what?

A

Vertical Scalability

70
Q

Elastic Load Balancers provide a static what?

A

DNS name

71
Q

To get the client’s IP address, ALB adds an additional header called what?

A

X-Forwarded-For

72
Q

What feature won’t send traffic to unhealthy (crashed) EC2 instances?

A

Health checks

73
Q

Which LB provides the highest performance and lowest latency?

A

Network Load Balancer

74
Q

Application Load Balancers supports which protocols?

A

HTTP
HTTPS
WebSocket

75
Q

ALBs can route traffic to different Target Groups based on what?

A

URL Path
Hostname
HTTP Headers
Query Strings

76
Q

Which type of Elastic Load Balancer has one static IP address per AZ?

A

Network Load Balancer

77
Q

Which cookie names are reserved by the ELB?

A

AWSALB
AWSALBAPP
AWSALBTG

78
Q

Which feature in both ALB & NLB allows you to load multiple SSL certificates on one listener?

A

Server Name Indication (SNI)

79
Q

What allows you to expose multiple HTTPS applications each with its own SSL certificate on the same listener

A

Server Name Indication (SNI)

80
Q

Can the ASG go over the maximum capacity (you configured) during scale-out events?

A

No

81
Q

When an EC2 instance fails the ALB Health Checks what happens?

A

The ASG will terminate the EC2 instance

82
Q

What does 0.0.0.0/0 mean?

A

All possible IP addresses

83
Q

Referencing by (blank) in rules is an extremely powerful rule.

A

Security Groups

84
Q

The Default Termination Policy for ASG is what?

A
  1. Find the AZ which has the MOST instances

2. Terminate based on OLDEST Launch Template

85
Q

Which LBs have a static DNS name?

A

ALB & CLB