High Availability & Scalability Flashcards
_______ are crucial for load balancers and they enable the load balancer to know if instances it forwards traffic to are available to reply to requests and health check is done on a port and a route (/health is common) and if the response is not 200 (OK) the the instance is unhealthy
Health checks
What are the different types of load balancer on AWS?
- Classics load balancer
- application load balancer (HTTP, HTTPS, TCP, SSL (secure TCP)
- Network load balancer (TCP, TLS (secure TCP), UDP)
- Gateway load balancer (operates at layer 3)
Application load balance is a __________ (HTTP)
Layer 7
_____________ load balancing to multiple HTTPS applications across machines (target groups) and multiple applications on the same machine (ex containers) and it support for HTTP/2 and websocket and support redirects (from HTTP to HTTPS for example)
Application load balancer
Application load balancer supports __________
Route routing ( routing based on path in URL, host name in URL, query string, headers)
ALB (Application load balancer) are a great fit for ___________ applications
Micro services & container based application (ex. Docket & Amazon ECS)
What are the different target groups for application load balancer?
- EC2 instance (can be managed by an auto scaling group)- HTTP
- ECS task (managed by ECS itself)- HTTP
- Lambda functions - HTTP request is translated into a JSON event
- IP addresses- must be private IPs
ALB can route multiple target groups & health checks are at the target group level
What are some features should know about application load balancer?
- Fixed host and (XXX.region.elb.amazonaws.com)
- The application servers don’t see the IP of the client directly (the true IP of the client is inserted in the header X-forwarded-For)
Network load balancer (layer 4) allows you to do what?
- Forward TCP & UDP traffic to your instances
- Handle millions of request per seconds
- Less latency - 100ms (vs 400 ms for ALB)
Network load balancer (NLB) has _____________ per AZ and supports assigning elastic IP(helpful for whitelisting specific IP)
one static IP per AZ
What are the target groups for network load balancer?
- EC2 instances
- IP Addresses (must be private IP)
- Application load balancer
- Health checks supports the TCP, HTTP, and HTTPS protocols
___________ is used to deploy, scale, and manage a fleet of 3rd party network virtual appliances in AWS
Gateway Load Balancer
What are some features of gateway load balancer?
- Operates at layer 3 (Network layer) - IP packets
- Combines the following functions:
1. Transparent network gateway- single entry/exit for all traffic
- Load balancer- distributes traffic to your virtual appliances
- Uses the GENEVE protocol on port 6081
What are the target groups for gateway load balancer?
- EC2 instances
- IP addresses (must be private IPs)
How does a gateway load balancer work?
- Users (source) use route table
- That route table sends traffic to the gateway load balancer
- The gateway load balancer send that traffic to your target group
- Target groups sends the traffic back to gateway load balancer
- The gateway load balancer sends traffic to your application
It’s possible to implement ___________ so that the same client is always redirected to the same instance behind a load balancer
stickiness (sticky sessions)
__________ works for classic load balancer, application load balancer, and network load balancer
Sticky session (the cookie used for stickiness has an expiration date you control) (NLB can work without cookies)
What are the use case for sticky sessions?
To make sure the user doesn’t lose his session data