Definition:
- Load balancer
- can set sticky session (session affinity) for ALB and NLB
- based on cookies
- Account-based cookies: custom vs application
- duration-based cookies: generated by lb
- Cross-zone load balancing: distribute accross multiple AZ. wb region?
- SNI: server name indication: load multiple SSL certificates to server for multiple websites
- e.g. 1 lb has 2 certificates. SNI choose the right one to resolve
- only for ALB and NBA, Amazon Cloudfront
Application Load Balancer
- Layer 7
- to HTTP applications across machines
- suppor routing based on path, hostname, query string
- can port map to redirect to dynamic port in ecs
- good for container-based workload
- target group: ec2, lambda, ecs task, private ip,.
- clientip can be seen in X-forwarded-port and proto header
- Crosszone: enable by default
Network LB:
- layer 4
- forward TCP/UDP traffic
- high performance, route millions of rq/s
- has 1 ip per az and support elastic ip
- supports health check
- target group: ec2, private ip, application LB (use for define layer 7 rules)
- Crosszone: enable cost extra
Gateway LB:
- layer 3
- Manage fleet of 3rd party network virtual applicance in aws
- allow traffic to be inspected by 3rd party security target group then load balanced
- Crosszone: enable cost extra