Home SQLSQL Server interview questions: - How will you 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





In this article we will show difference between WCF fault exceptions and normal .NET exceptions. For more articles and videos visit us on http://www.questpond.com/... Read More
By : Shiv Prasad Koirala | Aug 28th, 2012 | WCF
.NET interview questions: - Can you elaborate project life cycle?
In this article we will explain about project life cycle. For more articles and videos visit us on http://www.questpond.com/... Read More
By : Shiv Prasad Koirala | Jan 17th, 2012 | .Net
WCF Interview questions:- Which binding do we need to use for WCF REST?
In this article we will show Binding used for WCF REST. For more articles and videos visit us on www.questpond.com... Read More
By : Shiv Prasad Koirala | Nov 16th, 2011 | WCF
In this article we will explain about Sub-Queries and co-related queries. For more articles and videos visit us on http://www.questpond.com/... Read More
By : Shiv Prasad Koirala | Jul 2nd, 2012 | SQL
Five most important SharePoint 2010 interview questions
This article will give answers to 5 most asked questions in the interview.... Read More
By : Shiv Prasad Koirala | Aug 3rd, 2011 | Share Point
In this article we will show difference between WCF fault exceptions and normal .NET exceptions. For more articles and videos visit us on http://www.questpond.com/... Read More
By : Shiv Prasad Koirala | Aug 28th, 2012 | WCF
.NET interview questions: - Can you elaborate project life cycle?
In this article we will explain about project life cycle. For more articles and videos visit us on http://www.questpond.com/... Read More
By : Shiv Prasad Koirala | Jan 17th, 2012 | .Net
WCF Interview questions:- Which binding do we need to use for WCF REST?
In this article we will show Binding used for WCF REST. For more articles and videos visit us on www.questpond.com... Read More
By : Shiv Prasad Koirala | Nov 16th, 2011 | WCF
In this article we will explain about Sub-Queries and co-related queries. For more articles and videos visit us on http://www.questpond.com/... Read More
By : Shiv Prasad Koirala | Jul 2nd, 2012 | SQL
Five most important SharePoint 2010 interview questions
This article will give answers to 5 most asked questions in the interview.... Read More
By : Shiv Prasad Koirala | Aug 3rd, 2011 | Share Point
Article Categories
YouTube Videos