DEV Community

Cover image for 8 Type of Load Balancing

8 Type of Load Balancing

Ravin Rau on December 10, 2024

If you're diving into the world of web infrastructure, you've probably heard about load balancing. It's like the traffic cop of the internet, makin...
Collapse
 
rkedlaya profile image
Raghavendra Kedlaya

The article is well-covered and addresses an essential topic.

While it primarily discusses load-balancing, it also serves as a failover mechanism.

I believe the concept of load-balancing goes beyond distributing traffic across web servers. Many front-end servers deliver UI elements, JavaScripts and assets. Modern browsers do leverage caching, powerfull front-end technologies like Angular, React etc provide data processing and deliver seamless user experience.

From a portal’s perspective, the heavier workload typically lies within the application’s middle-tier or API servers. These servers interface with databases, process requests, and prepare data tailored to user needs. They need to manage concurrency, heavy data operations, and resource competition efficiently.

In my experience, effective load-balancing can also involve functional segregation of API servers. For instance, I’ve implemented setups where multiple API server groups with identical functionality are isolated by functional criteria, such as separating data by State of the Country or business unit. User requests are routed to the appropriate API server group based on the user group, ensuring both better performance and logical isolation.

Collapse
 
juniourrau profile image
Ravin Rau

Thank you very much @rkedlaya for your input. You are spot on—load balancing isn't just about spreading traffic across servers. It's also key for keeping things running smoothly and acting as a backup when needed.

I love your idea of splitting API servers based on function. It shows how load balancing can be customized to fit specific needs. By directing requests based on function, we boost performance and keep things organized, which is crucial for handling lots of data and resources efficiently. Maybe I can cover this in an article in the future.

Collapse
 
franklinthaker profile image
Franklin Thaker

very well written, thanks for sharing. very very helpful.

Collapse
 
juniourrau profile image
Ravin Rau

Thank you very much @franklinthaker. I'm happy I could share what I learned, and I'm glad others are finding it helpful.

Collapse
 
franklinthaker profile image
Franklin Thaker

Keep posting <3

Collapse
 
thesohailjafri profile image
Sohail SJ | TheZenLabs

Easy and Great Read!

Collapse
 
juniourrau profile image
Ravin Rau

Thank you very much @thesohailjafri

Collapse
 
ammar629 profile image
ammar629

As someone who is learning about backend development this was a great way to understand the load balancing concept Thank you

Collapse
 
juniourrau profile image
Ravin Rau

Thank you so much @ammar629 and all the best on your backend journey. I have learned a few things on the backend side that I will be sharing soon.

Collapse
 
ammar629 profile image
ammar629

I'm following you and looking forward to what you write next

Collapse
 
svijaykoushik profile image
Vijay Koushik, S. 👨🏽‍💻

Excellent job! Your concise and straightforward explanation helped me quickly grasp multiple load balancing approaches. Keep up the good work!

Collapse
 
juniourrau profile image
Ravin Rau

Thank you very much @svijaykoushik, I keep it concise to make it easy for me to grasp the approaches from time to time. I am glad that it is useful for others too.

Collapse
 
sjhjane profile image
Ben

Good, Thank you so much!

Collapse
 
juniourrau profile image
Ravin Rau

Thank you very much @sjhjane

Collapse
 
raman000 profile image
raman000

Good content .

Collapse
 
juniourrau profile image
Ravin Rau

Thank you very much @raman000

Collapse
 
bawa_geek profile image
Lakh Bawa

Thanks for sharing

Collapse
 
juniourrau profile image
Ravin Rau

Thank you very much @bawa_geek for reading it.

Collapse
 
indranil_kamulkar_62bc9a2 profile image
Indranil Kamulkar

Fantastic explanation, short and sweet and easy, helped me a lot

Collapse
 
juniourrau profile image
Ravin Rau

Thank you very much @indranil_kamulkar_62bc9a2. Glad that it helped you.

Collapse
 
uchechukwu_noble_28129eb5 profile image
Uchechukwu Noble • Edited

I'm new to backend using Django
How do I implement this in my projects
@juniourrau

Collapse
 
juniourrau profile image
Ravin Rau

Hi @uchechukwu_noble_28129eb5, honestly I haven't tried Django properly yet but based on my understanding here is what I have in mind.

Normally when you host/deploy a Django app you will need Gunicorn as the WSGI/Process Manager to manage the worker processes to communicate with your Django application. You can set nginx to handle the HTTP requests

Normal Setup

If you want to use nginx as a load balancer, it is when you have multiple servers hosting your Django application and you want to distribute your load around the server properly. You can set it like the article above based on your strategy.
Django Setup with Load Balancer

My recommendation is to first go with the normal setup and understand the interworking of how it works, then later on you can start experimenting with the load balancer once you understand how to deploy your application with docker.

Collapse
 
sabir_mustafa profile image
صابر مصطفی

Good share...

Collapse
 
juniourrau profile image
Ravin Rau

Thank you very much @sabir_mustafa

Collapse
 
katah_ profile image
Victor Catalan

nice Content! Thanks for sharing :)

Collapse
 
juniourrau profile image
Ravin Rau

Thank you very much @katah_

Collapse
 
codebyg14 profile image
Girish B Nair

Well explained!!!
Got to learn something in a effective and easier.
Thanks for yoir input!!!

Collapse
 
juniourrau profile image
Ravin Rau

Thank you very much @codegicode, glad to help you learn this faster

Collapse
 
elpidaguy profile image
Kaustubh Joshi

Great content👏🏻

Collapse
 
juniourrau profile image
Ravin Rau

Thank you very much @elpidaguy

Collapse
 
benborla profile image
Ben Borla

I learned something new today. Thank you!

Collapse
 
juniourrau profile image
Ravin Rau

Thank you very much @benborla. Glad that I can contribute something to you today.

Collapse
 
georgia_prisoners_speak profile image
Georgia Prisoners’ Speak

Good!

Collapse
 
juniourrau profile image
Ravin Rau

Thank you very much @georgia_prisoners_speak

Collapse
 
jeffreymk0213 profile image
Jeffrey

You have good exp with NGINX. Great

Collapse
 
juniourrau profile image
Ravin Rau

Thanks, I would not say that I have good experience. Still learning it.

Collapse
 
connectionshint profile image
Connections Hint

Great!

Collapse
 
juniourrau profile image
Ravin Rau

Thank you very much @connectionshint

Collapse
 
hanzla-baig profile image
Info Comment hidden by post author - thread only accessible via permalink
Hanzla Baig
Collapse
 
sibasis_padhi profile image
Sibasis Padhi

Simple & clear!

Some comments have been hidden by the post's author - find out more