From past few days I was spending time on network load balancing for web servers and found some basic concept about it.

First come what is load balancing (in a non-bookish manner J ). Well load balancing is some sort of technology where multiple systems are used to reduce the load of a single system.

Suppose a server serves per request within 20ms for 10 users for a certain web application but somehow that application get popular with in few days and user get increased 10 to 10,000!! Do you still believe that server with same configuration and same application can serves per request within 20ms? Umm …. I’m sure your answer is now. So people resolve these things? Well there are many solutions, among them network load balancing is a common solution.

The main reasons of load balancing are minimize response time, maximize user of resource utilization, maximize throughput and so on.

Load balancing solutions : Nowadays load balancing is perform through different type of technologies such as hardware load balancing device , load balancing software , gateway with built in load balancing features, Round robin DNS etc.

Image


Persistence problem: Better to mention it “sticky session” problem. Suppose we are using two web servers (Server A and Server B) which are load balanced now a user login into a web application which runs on Server A and stars purchasing items suddenly load balances device identified that the load is full for Server A and auto failover to Server B, in this condition the session state is going to be lost as the session state was hold by the Server A. Isn’t it a crap! Of course it is. This issue can be resolved by storing the session data in client side through cookie but for security reason it’s not possible to for highly secured site, another solution is storing session data in database though it creates performance issue but increase the scalability.

Most of the hardware load balancer work at Transport layer (OSI layer 4) and Application layer (OSI layer 7). Intelligent load balancer checks the server’s health through communication with server and distribute load as per need, it also manages sticky session problem and distribute the load accordingly so that users can there sessions at same server.

That’s all for now .

Bye

Leave a Reply