Chp 8: High Availability + Scalability --> ELF and ASG Flashcards
What is scalability? What are the types
- apps/system can handle greater loads by adapting
- types: horizontal/vertical
What is vertical scalability?
- increasing the size
- scale up/down
what is horizontal scalability
increase the # of instances
high availability goes hand in hand with what?
horizontal scalability
what does high availability mean?
- run app/system in at least 2 data centers (= AZ)
- can be active or passive
What is a load balancer?
- servers that forward traffic to multiple servers downstream
Why use a load balancer?
- spread load across multiple downstream instances
- expose a single point of access
- regular health checks
- provide SSL termination
- enforce stickiness with cookies
- high availability
- separate public traffic from private traffic
- AWS takes care of everything
what are health checks?
is a clone on a port/route
What are the types of load balancers?
- classic
- application
- network
- gateway
classic load balancer/
http, https, tcp, ssl
Application load balancer
- http, https, websocket
- good for microservices and container
- port mapping
ALB target groups
- ec2 instances
- ec2 tasks
- lambda function
- ip address
How many groups can ALB be routed to?
many
Health checks are at what level
target group level
ALB– hostnames or IPs
fixed hostname. it doesnt see IP of the client
ALB– how does it get the IP of the client?
used header x-forwarded port
network load balancer
- tcp, tls, udp
- one static IP per AZ
- supports assigning elastic IP
NLB – target groups
- ec2 instances
- ip addresses (private ips)
- ALB
Gateway load balancer
- operates at layer 3/network
- single entry/exit for all traffic
Gateway load balancer’s target group
- EC2 instances
- IP addresses (private IP)
What is a sticky session
the same client is always redirected to the same load balancer
sticky sessions work for which type of load balancer
ALB and GLB
what happens with cross zone load balancing?
each load balancer instance distributes evenly across all registered instances in all AZ
what happens without cross-zone load balancing?
requests are distributed in the instances of the nodes of the ELB
What is SSL? Whats the newer version?
- SSL encrypts connection
- TLS is the newer version
Load balancers uses what kind of certs
x509
Server Name Indication (SNI) – Purpose
- SNI solves the problem of loading multiple SSL certs onto one web server
- Only works for ALB + NLB
What is an auto scaling group (ASG)
- scale out to match AWS increased load
- scale in to match a decreased load
- ensure there’s a min + max # of running machines
- automatically register new instances to a load balancer
ASG Alarms
use cloudwatch alarms
ASG – Scaling Policies
- target tracking
- simple/step scaling
- scheduled actions
what happens during an ASG scaling cool down
- after a scaling activity, you are in a cool down period
- during the cool down period, you will not launch or terminal additional instances
ASG default termination policy
- find the AZ which has the most # of instances
- if there are multiple instances in the AZ to choose from, delete the one with the oldest launch config
- ASG tries to balance the # of instances across AZ by default
which is preferred? launch config or launch template?
launch template