Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




SQL Server interview questions: - Explain stateless and stateful load balancing?

Following way you can answer this SQL Server interview questions.

Stateless load balancer

Stateless load balancer uses the hashing algorithm. It takes packet from the client and selects fields from the packet to be hashed. For instance from each client it can take IP address and port number and hash them in to an integer between 1 to number of servers. You can see from the figure we have four servers. So the load balancer takes the IP address and port and hashes them with a number between 1 to 4. Depending on the number the client is directed to the server. For instance client A is directed to server 2, client b to server 1 and so on. Once the client is connected to a server it is always redirected to the same server.

Figure: - Stateless load balancing

Advantage of stateless load balancing is that it’s simple. The biggest disadvantage is that it treats all clients equally and connects one client to one server always. That is if client A is connects to server 2 it will always connect to server 2. This is irrespective of how many times client A sends request. So if client A sends 100 request and client B sends 10 requests even then client will be sent to server 2 for all the 100 request and client B to server 1 for all requests.

Stateful load balancer

In stateful balancing the load balancer looks at each session and assigns it to the appropriate server based on load. In order that the load balancer can track each session it needs to know when the session starts and when it ends.

Figure: - Stateful load balancing

You can see from the figure for every session the load balancer redirects the request to different servers.

See the following video on Data Access layer used in Enterprise Application Block as follows: -

Click for more SQL Server interview questions

Regards,

Visit for more author’s blog on SQL Server interview questions

Share this article   |    Print    |    Article read by 5855 times
Author:
Shivprasad koirala Koirala
I am a Microsoft MVP for ASP/ASP.NET and currently a CEO of a small E-learning company in India. We are very much active in making training videos , writing books and corporate trainings. Do visit my site http://www.questpond.com for .NET, C# , design pattern , WCF , Silverlight , LINQ , ASP.NET , ADO.NET , Sharepoint , UML , SQL Server training and Interview questions and answers
Related Articles: No related article
Related Interview Questions: No related interview question