Ref: https://learn.cantrill.io/courses/1820301/lectures/41301438 and https://learn.cantrill.io/courses/1820301/lectures/41301441
AWS Elastic Load Balancer (ELB) - Evolution and Types
- v1 (legacy)
- Classic Load Balancer (CLB) → avoid its use, migrate to v2 if still using it
- v2
- Application Load Balancer (ALB)
- Network Load Balancer (NLB)
- 💡 NOTE: There's a fourth type of ELB, the Gateway Load Balancer (GWLB), but it's a bit of an odd member in the ELB family, check its own dedicated section
ELBv1 (Legacy) - Classic Load Balancer (CLB)
Diagram: https://github.com/acantril/aws-sa-associate-saac03/blob/main/1500-HA_and_SCALING/00_LEARNINGAIDS/ALBvsNLB-1.png
- 🔧 Legacy ELB (introduced in 2009)
- Balances HTTP(S) and other low-level protocols
- 💡 But can't really be considered an OSI Layer7 ELB…
- ‼️ 👎 Lacks modern features!! → AVOID it's use nowadays, migrate from it!
- CLB connects directly to a single backend pool, made of backend instances/ASGs (Auto Scaling Groups). Can only distribute traffic evenly to that pool.
- Disadvantages/Limitations:
- 👎 No SNI support → Limit of 1 SSL certificate per CLB → Scales very badly
- If you have many domains, you will need many SSL certificates, and hence many CLBs → many CLBs can get very expensive
- 💡 Server Name Indication (SNI) = extension to the Transport Layer Security (TLS) protocol, by which a client indicates which hostname it is attempting to connect to during TLS handshake, at Layer 4 (before encryption) → server can understand which SSL certificate the client needs → allows a server to host many SSL certificates, each with a different IP
- 👎 NO support for target groups (just one single backend pool)
- 👎 Only single-protocol listeners, whereas ELBv2 supports multi-protocol listeners
- 👎 Even though it can balance HTTP(S), CLB can NOT take routing decisions based on HTTP protocol features
- Unlike ALBs, NO support for rules (path-based routing, host-based routing, HTTP-content routing…)
- Unlike ALBs, NO per-rule health checks
ELBv2
Diagram: https://github.com/acantril/aws-sa-associate-saac03/blob/main/1500-HA_and_SCALING/00_LEARNINGAIDS/ALBvsNLB-1.png
- 🔧 Modern ELB (introduced in 2016)
- 👍 Faster, cheaper, support target groups
- 👍 ALBs support rules → 1 SSL certificate per rule, instead of per ELB → a single ALB can be used for multiple things (unlike CLB)
Application Load Balancer (ALB)