ELB and ASG Flashcards
Describe scalability and compare vertical vs horizontal scalability?
Scalability means the system can handle greater loads by adapting
- Vertical scalability: Increasing the size/power of the underlying infra
- Horizontal scalability: Increasing the number of instances within the system
What is an ELB?
An ELB is an Elastic Load Balancer which provides a singular access point which will distribute incoming traffic to multiple downstream instances
What are the purposes of health checks?
Allows an Elastic Load Balancer to mark instances as unhealthy, meaning it wont be forwarded traffic
What are the 4 types of managed load balancers?
- Classic load balancer (Depreciated)
- Application load balancer
- Network load balancer
- Gateway load balancer
What layer does the ALB work on? What are the best use cases for ALB?
Layer 7, so it supports HTTP/HTTPS and redirects and mainly works with the url. Best supports microservices and container based applications (Docker and ECS).
How can an application behind a application load balancer determine the IP address of the client?
It is stored in the X-Forwarded-For header aswell as having X-Forwarded-Port and X-Forwarded-Proto
What layer does NLB work on? What does this mean and what are it’s main characteristics?
Layer 4, so deals with TCP and UDP traffic to instances. Can handle millions of requests per second and are ultra-low latency
How many IP’s can an NLB have per AZ?
One static IP per AZ and supports assigning elastic ip
What protocols does the NLB support for health checks?
TCP, HTTP and HTTPS
When would you want to use a GLB?
When you require all traffic to come through a firewall, intrusion detection system, or deep packet inspection system
What layer does GLB work on?
Layer 3, using the GENEVE protocol on port 6081
What is the use case of a sticky session (session affinity)?
When you require a client to always be redirected to the same instance behind the load balancer
What 2 cookies does sticky sessions use?
- Application-based cookie (can be custom or application cookie)
- Duration-based cookie
Describe how traffic is distributed when cross zone load balancing is enabled versus disabled.
Enabled - Each load balancer instance distributes evenly across all registered instances in AZ
Disabled - Requests are only distributed across the nodes that are attached to the load balancer
Which load balancers have cross zone load balancing enabled by default with no charges for inter AZ data, and which have it disabled with charges?
Application load balancer - Enabled by default with no charges
Network load balancer and Gateway load balancer - Disabled with charges