Skip to main content

WHAT DOES LOAD BALANCER DO BETWEEN CLIENT COMPUTER AND SERVERS?


Whenever we talk about websites we often tend to be restricted to the domain and hosting only. A person who is generally developing websites does only take care of designing the front end and moreover functionality related to back-end. Most of the  people never thought about the servers and load balancer. Even a student in computer science often confused about the true working of traffic management in servers as well as load balancing it to make sure running the website and application without causing any issue to the end users.

So this article is all about how actually the load balancer work in a real time environment. There are three things that need to understand

1.               Client
2.               Load balancer
3.               Server

Server -Servers are computer programs running to serve the requests of other programs, the clients Thus, the server performs some tasks on behalf of clients. It facilitates the clients to share data, information or any hardware and software resources

The client is the end user who is using the service. The n number of the client accessing the application is what that termed as traffic. If the capacity of a server to handle the request is less than the condition of server down occurs.

The load balancer is nothing but a medium to divert the traffic between various servers according to their capacity such that the load on each server remain the same. The load balancer mainly helps application to maintain its availability all the time. Such as if any server is not working it won't be the problem for the application as Load balancer will divert all the traffic from that server to the remaining one such that user even don't get the feeling of using different server for his/her queries. So let us talk about how everything works in a real time.

There are various load balancing algorithms involved taking care for diverting traffic such as round robin, first come first serve, session management and others. Using session by load balancer is the best thing as it takes care of request coming from the same client and often process the requests to the same server for which earlier it was processed.

Load balancer such as F5 convert the IP address from the client to the required IP address for the server for processing the request and revert again while processing the request from the server to the client.

For more information, you can refer to the following links -


Comments

.

Popular posts from this blog

Basics of System Design

This article is first one from the series of articles dedicated to system design interviews. Here i am going to present the base scenario to consider before starting to solve system design problems.
Questions to ask?
1) what is the number of requests a website will recieve in a day/month/second? 2) what is the amount of memory a website will deal in a day/month/second? 3) what is the number of servers that can accomodate these requests?
To answer this , first we need to remember the below numbers:-
1 million = 10 lakh = 1000000 = 10^6 1 billion = 1000 million = 10^9
1 KB = 1024 B = 10^31 MB= 10^6 = 1024 KB 1 GB= 10^9 = 1024 MB1 TB = 10^12 = 1024 GB
Memory we need to see in BytesRequests we need to see in numbers
example :-
suppose a website recieves 100M requests every month then:-
requests per day = request per month /24 = 416700 requests requests per second = requests per day / (24*3600) = 4.8 requests per second
memory:-
if we take 20:80 principal where 20 percent is write and 80 percent is …

Calculating size of User and Cache storage

user storage:-
it can be solved using same scenario as mentioned in first article .

https://tech.nazarmubeenworks.com/2019/08/basics-of-system-design-chapter-0.html


Suppose there are 12 Million of users are adding every year meaning 1 Million per month.
So if we consider 5 year there will be around 60 million of users. Now in terms of data we can look to our DB table and get information about it. A user will be generally having name , id , address , some forien keys .
Lets assume 10 columns with each column on an average storing 4 byte of data.
10*4 = 40 bytes of data for one user.
60 * 10^6 * 40 = 2400 * 10^6 = 2.4 * 10^9 = 2.4 GB of data we need to store only user values.
Also while calculating storage for the user there is also one important point we need to remember is of ids. If we are going to have 60 Million of users which means 60*10^6 users so unique id’s will be
as we know below figures are almost equal
2^10=10^3 then 60*(10^3)^2 = 2^20 *2^6
which means we almost need 26 …