ELB Flashcards
What is vertical scalability?
scaling from something smaller (i.e t2mcro) to something larger (i.e t2large)
What is horizontal scalibility?
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
What is high availability?
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
What is load balancing?
Load balancers are servers that forward internet traffic to multiple servers (EC2 Instances) downstream.
Why use load balancer (8)?
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.
What are the three types of load balancers offered by AWS?
Classic (legacy)
Application
Network
What type of traffic does the Classic load balancer support?
HTTP & HTTPS (Layer 7),
TCP (Layer 4)
What type of traffic does the Application Load Balancer support?
HTTP & HTTPS (Layer 7),
WebSocket
What type of traffic does the Network Load Balancer Support?
TCP,
TLS (secure TCP),
UDP
T/F Load balancers can be both public or private
True
What is load balancer stickiness?
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.
(T/F) Cross zone load balancing is not enabled by default for ANY load balancers.
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.
What is Server Name Indication (SNI) & how to ELBs play a role?
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
T/F Classic load balancers can only support one SSL certificate
TRUE
What is Connection Draining
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.
What are the 4 main goals of an auto scaling group (ASG)?
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
What are Scaling policies based on?
AS Policies can be based on any # of factors such as CPU useage, network, and schedule or even custom metrics
What AWS Services are used to launch ASGs?
Launch configurations or Launch templates (newer)
What is the cost of ASGs?
ASGs are free. You pay for the underlying services (i.e. EC2 instances)
What are the 3 main ASG Scaling Policies?
Target Tracking Scaling
Simple/Step Scaling
Schedules Actions
What is Target Tracking Scaling?
Most simple Scaling policy to set up.
Example -I want average ASG CPU to stay around 40%
What is Simple/Step Scaling?
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.
What are Scheduled Actions Scaling Policies
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.
What are auto scaling cooldowns?
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.
Enables you to use Amazon EC2 Auto Scaling features such as health check replacements and scaling policies.