ELB Types
Last updated
Last updated
There are 3 kind of load balancer on AWS
Application Load Balancer (ALB)
Network Load Balancer (NLB)
Gateway Load Balancer (GWLB)
Some load balancers can be setup as internal (private) or external (public) ELB.
Application load balancers is Layer 7 (Http). It support for Http/2 and websocket apart from this it is able to redirect HTTP to HTTPS. It routes traffic to different target group. Target group can be inside the same machine (multiple containers) or across machine (multiple applications).
There are a lot of way routing traffic including.
Routing based on path in URL - example.com/users - example.com/posts
Routing based on hostname - one.example.com - two.example.com
Routing based on Query String , Headers - example.com/users?id=123&order=false - example.com/users?id=123&order=true
Microservice
Container based application
Application server (target group) don't see the ip of the client directly. Load balancer will attach the header X-Forwarded-For
, X-Forwarded-Port
and X-Forwared-Proto
in the request so you can get IP
, Port
and Protocol
from its.
Network load balancers is Layer 4 (TCP/UDP). It allow to forward TCP & UDP traffic to instances. It handles milion request per seconds (High performance). NLB has one static IP per AZ and support assign Elastic IP. It supports for HTTP , HTTPS and TCP/UDP.
High performance load
Control TCP/UDP
Gateway Load Balancer is Layer 3 (Network Layer). It is a single entry/exit for all traffic. This load balancer will forward request to virtual appliance for fraud detection or something . It used GENEVE
protocol on port 6081.
Firewall
Prevention System
Payload Mainpulation