> For the complete documentation index, see [llms.txt](https://karansingh.gitbook.io/ccpnotes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://karansingh.gitbook.io/ccpnotes/elb-and-asg/elastic-load-balancing.md).

# Elastic Load Balancing

* Basically, the **load balancer will distribute the traffic across multiple targets/servers** and it can across multiple Availability Zones.<br>

* It monitors the health of all your targets and only spreads the load to the healthy targets, so it basically does health checks as well.<br>

* ELB is a managed Load Balancer by AWS, so AWS takes care of most of the stuff; you can also create your own but it's much more effort to maintain and integrate.

* There are 3 main types of Load Balancers: \
  1\. **Application Load Balancer** - Functions at the **application layer** (the 7th of the OSI model), so for HTTP and HTTPS.\
  2\. **Network Load Balancer** - Functions at the **transport layer** (the 4th of the OSI model), so for high performance, TCP and UDP connections\
  3\. **Classic Load Balancer - It can only be used with EC2 classic instances.** It is **slowly retiring** and won't be asked about in the test.
