Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Load Balancing is a process that is used to uniformly route the request of users/clients to

the different servers that are available for use to the servers that are currently in working
condition. In simpler words, load balancing is a process of balancing the load on different
servers.

For example, if you are having 10 servers and 1000 users, then in an ideal situation each
server should handle the request of 100 users.

The process of Load Balancing is done with the help of Load Balancers. The following
image illustrates the Load Balancing process:

Hashing is one of the common methods used in Load Balancing. Here, we have something
known as requestId that is uniquely and randomly generated. Each request by the client is
uniquely identified by this requestId.
so, for example, if the requestId is 154 and there are 5 servers available. Let's say the Hash
Function will give the result as 23. Then the following calculations will be done:

total number of servers = 5


hashFunction(requestId)
hashFunction(154) = 23
so, the assigned server will be: 23 % 5 = 3
therefore, the 3rd server will be assigned

So, by performing the above method the load is uniformly divided i.e. if the total number of
requests is R and the total number of active server is N then load on each server is going to
be R/N .

You might also like