What is a load balancer?
Published: 2020-05-11 16:44:24

---
title: What is a load balancer?
published: true
description: 
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/fk7v356j84dauphnry9g.png
tags: 
---


Thank you for clicking on this! 🙌
I will give you a brief answer! 🙇‍♂️

-------------------

> *TLDR;* "In computing, load balancing refers to the process of distributing a set of tasks over a set of resources"

 [Here's a short video I created](https://youtu.be/b_vmmgTIIPM) 

-------------------

###Introduction:

A load balancer is a software or a physical device that shares out the workload across servers/resources. It sits between the front-end and back-end (server-side load balancers). Any requests to the back-end will go through the load balancer, which will decide what server to send it to. The load balancer may ask questions like: is server-1 running? If not, send it to server-2 or which server is the fastest for computing calculations? etc.

**Examples of load balancers include:**
•	   Nginx
•	   AWS Elastic Load Balancing

###What does it prevent?
A single point of failure. Instead of all the requests going to one server, it can be redirected and distributed effectively.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/gt9ff7yt65x8x2uo5sz3.png)

Do not get me wrong, the load balancer is smart. By doing all sorts of algorithmic and factor-driven decisions it can provide a greater and less strained application experience. It can work for sessions management, security management (firewalls), performance and so on.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/p2wyiqvtiopjr3q8yann.png)

####For Application HTTP request management:
•	Server-side load balancers (between the frontend and backend)
•	Persistence (sessions management)
•	Priority activation (Number of available servers not enough then it can start standby servers)

###Example scenario:

> **User:** Hey Dexxter (load balancer)! I need this book called  “How to make How-tos”

> **Load balancer:** Hmm, I see server 2 and server 1 have too much to do. Also, the number of available servers has dropped below 1 (no more available) or (drops below a certain number), There’s server 3 on standby so I’ll wake it up and tell it to handle/do that request for you. << That is Priority activation.

> **Load balancer:** I used Asymmetric load where a “ratio can be manually assigned to cause some backend servers to get a greater share of the workload than others” I happened to give server 2 more work than server 1 to make better use of the backend resources. This will give a faster user experience.

> **User:** That ebook loaded really quickly. I wonder what they did differently on this site.

*cough* *cough* they used a load balancer!

**Features of server-side load balancers**:
> **Asymmetric load** "A ratio can be manually assigned to cause some backend servers to get a greater share of the workload than others."

> **Priority activation** "When the number of available servers drops below a certain number, or load gets too high, standby servers can be brought online."

####Conclusion:

A load balancer is a magnificent🙏🏻, powerful 💪, way of distributing the workload in the back-end. Thank you for reading this far! 😃

Please find more information on Wikipedia
{% wikipedia https://en.wikipedia.org/wiki/Load_balancing_(computing) %}