Understanding load balancing
- Loadbalancer is used to distribute load across multiple servers

- LoadBalancer gets an ip address/name which is used to connect to multiple servers.
- Load Balancers are of two types
- Hardware Based
- Software Based
- Cloud Providers offer load balancers with all the necessary features
- Load Balancers for applications act at two layers
- layer 4:
- This operates at tcp/udp, ip address, port
- layer 7:
- In addition to layer 4 it understand http(s)
- url
- name based routing
- path based routing
- header based
- url
- In addition to layer 4 it understand http(s)
- layer 4:
- LB have sticky sessions
- Cloud LBS have an option to automatically detect the scaled servers
- Cloud LB’s forward the request to the servers where the health checks are passing
Layer 4 LB
- Layer 4 LB are fast and generally they are used to lb one application

- It is possible to increase applications which this LB will serve, in that case each applicaton should be calling a differnt port of lB
Layer 7 LB
- Layer 7 LB offer more features such as
- path based routing
- name based routing
- header based routing

