Load Balancing

Load Balancing

Load balancing is a technique to avoid network traffic by distributing all requests equally in all the resources (like the servers) that supports an application. With the rise of technology, there are modern applications which must be able to handle millions of users simultaneously without any crash or without any delay. It should be able to provide the correct data or information in a fast and efficient manner.

Now, to handle such enormous traffics, most applications have many servers to handle load.

A load balancer is a device that handles the traffic by distributing it in an efficient manner. It is in-between the user and the server. Let's suppose a user is logging into a website. Now during this, a particular server will be hit and it will hold the details. Now whenever the user repeats the same thing, the server that holds the details should be handling it instead of other servers. This will lead to fast and efficient accessing of data. All this is maintained by a load balancer.

Why load balancing is required ?

Let us see with a real life scenario. Suppose You have a carry bag which can hold a capacity of 5kg items. Let's assume you went to buy groceries and you took items weighing 5kg and you still want to buy items of 2kg more, there's a high chance that your carry bag will get torn. Therefore, it will be smart enough if you take items in another carry bag rather than the same bag and eventually it will be balanced out.

Likewise we need to balance the requests send by users. If all the request gets hit to the same server the system will crash and there will be huge loss to the company.

Another example is Suppose there's a cricket match or football match final going on. Therefore, browsers like google can be extremely busy due to people trying to get latest data of scores. Now to avoid crashing, load balancing plays a great role. Another thing can be like nearest servers can handle requests of the native users like on basis of location.

Benefits

  1. It improves an application's availability.

  2. Scalability is maintained.

  3. There is security and great performance.

Note: This blog is just about the introduction of load balancing. In coming blog, we will see about the algorithms and the types.