AWS Load Balancers - Why Do We Need Them?

Tomek S.    November 21    5 min

Black Friday, Singles day, Christmas discounts? There’s a lot of campaigns going on these days where many of the largest e-commerce platforms are working their hands off to get the piece of the market. Especially nowadays when the COVID-19 is peaking and the shopping is turning digital. The long hour waiting queues outside the boutiques and malls aren't physical anymore, they're all heading towards the web, without a single minute of queuing.

This is something that the e-commerce providers are hoping for and they will probably get a new record of online customers and Black Friday shoppers on their websites during the high discount period instead. Their web traffic will have a dramatic increase and this is exactly what they want, but are they prepared?

Shopping queue

This is why we need the Load Balancers

When the websites are highly loaded of users scrolling around on their websites, it’s not only the revenue that spikes. It’s the server capacity that gets an intensive load, which is really bad if they haven’t prepared well. This is where the load balancer gets in the picture. The load balancer has one particular job, which is to distribute the client request between multiple servers and balance out the load over all your running server instances, therefore the name “load balancing”.

All users that are shopping online during the great Black Friday discount hours, will have a seamless experience on the website if everything works out fine, instead of looking at 503 Service Unavailable responses on their browser. The requests in the back-end serve the data without any delay and the load capacity of the servers are far under the critical line for overload.

How does Load Balancers work?

So why does this “load balancer” work out that fine and what does it actually do on the server side? Well, it works by analyzing the traffic of a website, then it redirects the users automatically to servers that can handle more traffic. This prevents one single server from getting overloaded. Thus, it makes sure that all traffic is served efficiently.
Moreover, load balancing also allows flexibility in the number of servers. If a new server is added, the load balancer will automatically start distributing the traffic to that server as well. This makes it possible for you to set up auto scaling based on different rules you set up.

If you are hosting your websites on Amazon Web Services, you can make use of their Elastic load balancing (ELB) service. They offer several types of load balancing, such as application and network balancing. Amazon ELB makes sure that your applications are always available across all regions. Moreover, everything is done automatically. AWS will dynamically increase or decrease servers based on the traffic you are receiving. Amazon ELB also allows you to optimize your websites as you can monitor the traffic and performance in real-time. Therefore, you can identify any problems and bottlenecks with your website. There are many tutorials on how to set up an load balancer and AWS provides their own, which is really good to get a good grasp on how to set up an Elastic load balancer.

Tomek Semkov profile
Author: Tomek Semkov
Editor, Software developer with a high interest in Cloud Computing. Admires all the new technology in the world and have a great passion for the tech sector. You can find me in Stockholm - working on some cool projects. Find out all my posts or just contact me on LinkedIn if you wanna chat!