ELB Flashcards

1
Q

What is vertical scalability?

A

scaling from something smaller (i.e t2mcro) to something larger (i.e t2large)

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

What is horizontal scalibility?

A

Implies distributed systems

Increase the # of instances running (i.e add an EC2 instance lke a t2micro rather then scaling vertically to a larger instance)

AKA scaling up or scaling down

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

What is high availability?

A

usually goes hand in hand with horizontal scaling (but not always)

Also refered to as scaling out or scaling in

Means running the application in at LEAST 2 Availability Zones

Goal is to survive a AZ zone loss

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

What is load balancing?

A

Load balancers are 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
5
Q

Why use load balancer (8)?

A

Spread load across multiple downstream instances.
Expose single point of access (DNS) to your application.
Seamlessly handle failures of downstream instances.
Do regular health checks to your instances.
Provide SSL termination (HTTPS) to your websites.
Enforces stickiness with cookies
High availability across zones
Separates public traffic from private traffic.

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

What are the three types of load balancers offered by AWS?

A

Classic (legacy)
Application
Network

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

What type of traffic does the Classic load balancer support?

A

HTTP & HTTPS (Layer 7),

TCP (Layer 4)

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

What type of traffic does the Application Load Balancer support?

A

HTTP & HTTPS (Layer 7),

WebSocket

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

What type of traffic does the Network Load Balancer Support?

A

TCP,
TLS (secure TCP),
UDP

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

T/F Load balancers can be both public or private

A

True

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

What is load balancer stickiness?

A

The same clients gets redirected to the same EC2 instance every time. Helps ensure session data isn’t lost.

Works for classic and application LB.

The cookie used for stickiness has an expiration date you control.

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

(T/F) Cross zone load balancing is not enabled by default for ANY load balancers.

A

FALSE.

Cross zone zone load balancing IS ALWAYS ON for application load balancers, and there in NO charge for this service.

It is disabled by default on both Classic and Network LBs.

There is no charge on CLB if enabled.

There IS a charge on NLB if enabled.

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

What is Server Name Indication (SNI) & how to ELBs play a role?

A

SNI solves the problem of loading multiple SSL certs onto one web server to serve MULTIPLE websites.

Its a newer protocol and requires the client to indicate the hostname of the target server in the initial SSL handshake

Only works on ALB and NLB

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

T/F Classic load balancers can only support one SSL certificate

A

TRUE

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

What is Connection Draining

A

Connection Draining, AKA Deregistration Delay (ALB & NLB) is when an EC2 instance begins the shutdown process because it was determined to be unhealthy. During this draining process, existing connections are first being completed before complete shutdown.

New requests are NOT sent to the instance while in this stage.

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

What are the 4 main goals of an auto scaling group (ASG)?

A

Scale out to match increased load (add instances)

Scale in to match decreased load (remove instances)

Ensure we have min and max number of instances running

Automatically register new instances to a load balancer

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

What are Scaling policies based on?

A

AS Policies can be based on any # of factors such as CPU useage, network, and schedule or even custom metrics

18
Q

What AWS Services are used to launch ASGs?

A

Launch configurations or Launch templates (newer)

19
Q

What is the cost of ASGs?

A

ASGs are free. You pay for the underlying services (i.e. EC2 instances)

20
Q

What are the 3 main ASG Scaling Policies?

A

Target Tracking Scaling
Simple/Step Scaling
Schedules Actions

21
Q

What is Target Tracking Scaling?

A

Most simple Scaling policy to set up.

Example -I want average ASG CPU to stay around 40%

22
Q

What is Simple/Step Scaling?

A

Scale in and Scale out policies can be defined using CloudWatch.

Example set CloudWatch alarm to be triggered if CPU > 70%. If exceeded, add another instance.
Likewise, set CloudWatch alarm if CPU drops below 30% drop and instance.

23
Q

What are Scheduled Actions Scaling Policies

A

If usage patterns are known or could be anticipated the you can set policies to automatically scale in or out based on specific time frames.

24
Q

What are auto scaling cooldowns?

A

The cool down period helps o ensure that your Auto Scaling group doesn’t launch or terminate additional instances before the previous scaling activity takes effect.

25
Q

How can you reduce costs as it relates to auto scaling cooldowns?

A

If the default cooldown period of 300 seconds is too long - you can reduce costs by applying a scaling specific cooldown period of 180 seconds to the scale-in policy.

26
Q

Your application is using an Application Load Balancer. It turns out your application only sees traffic coming from private IP which are in fact your load balancer’s. What should you do to find the true IP of the clients connected to your website?

A

look into the X-Forwarded-For header in the backend

27
Q

You would like to expose a fixed static IP to your end-users for compliance purposes, so they can write firewall rules that will be stable and approved by regulators. Which Load Balancer should you use?

A

Network Load Balancer

28
Q

What does a Network Load Balancer Expose? ( public static IP or static DNS) ?

A

Public Static IP

29
Q

What does an Application Load Balancer Expose? ( public static IP or static DNS) ?

A

static DNS

30
Q

What types of Target Groups exist for ALB’s?

A
EC2 Instances (can be managed by Auto Scaling Group)
Lambda Functions (HTTP request in translated into a JSON event)
ECS tasks (Managed by ECS itself - HTTP)
IP Addresses - must be PRIVATE IPs
31
Q

Troubleshooting LBs - what are 4xx errors?

A

Client Enduced Errors

32
Q

Troubleshooting LBs - what are 5xx errors?

A

Application induced errors

33
Q

Troubleshooting LBs - what is a 503 error?

A

Instance is at capacity or there is no registered target

34
Q

If an LB cannot connect to your application what is one of the first things you should check in troubleshooting?

A

Security group rules

35
Q

Can SNI be applied to all load balancer?

A

No. Only ALB & NLB

36
Q

What is another name for connection draining?

A

Deregistration Delay

37
Q

What is the difference between simple/step scaling and target tracking?

A

Simple Scaling relies on setting a CloudWatch metric as a basis for scaling. For example, when CPU reaches 80& scale up to add 20% capacity. Step scaling builds on this by allowing you set multiple actions.

Target Tracking lets you specify a scaling metric and metric value that your ASG should maintain at all times. Example CPU utilization of your EC2 should always be around 80%.

38
Q

Which load balancer(s) allow stickiness?

A

Classic and Application

39
Q

Does connection draining/deregistration delay occur on all load balancers?

A

No. Only ALB and NLB

40
Q

What is an ELB Target Group

A

A specified destination where traffic is routed to

41
Q

What is an Auto Scaling Group (ASG)

A

Contains a collection of Amazon EC2 instances <br></br>

Enables you to use Amazon EC2 Auto Scaling features such as health check replacements and scaling policies.