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
2. Load balancer
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 -