Solved

Load balancing ASP.NET WIndows 2003 while preserving session state.

Posted on 2008-10-22
4
1,318 Views
Last Modified: 2013-12-02
I have an interesting question.

We recently setup a web farm using 2 web servers and 1 database server on a Zeus shared load balancer using round robin traffic shaping. Our sessions are stored via cookie on the user's local machine. The problem we're running into is, given that the load balancer treats HTTP and HTTPS as separate requests, sometimes a user may start at one machine, and end up at the second machine when they call up an HTTPS page, or vice versa.

I know the best option is to store session data in the database to avoid the issues with HTTP/HTTPS, but are there any other options? For example, would Windows NLB solution be a viable option to preserve session state, or are there other load balancers that can do some form of cookie based load balancing, or..

Essentially, I'm trying to determine if there's an option to properly load balance 2 Windows Server 2003 Standard web servers while avoiding the issues caused with changing servers during HTTP/HTTPS switchovers, etc.

If that makes sense.
0
Comment
Question by:jmoriarty
4 Comments
 
LVL 51

Assisted Solution

by:tedbilly
tedbilly earned 150 total points
ID: 22792916
Round robin is not a good solution.  Other than the problems you are having there is also an issue that if you need to reboot one server (to install an update) there is issues as well.

With Windows NLB you can create sticky sessions using Affinity.  You don't have to change anything in your application and it 'Works'!
0
 
LVL 3

Assisted Solution

by:mickdoc
mickdoc earned 150 total points
ID: 22797022
Windows Load Balancing is your best bet then.

By default your affinity (stickiness for another word) is set to "Single" (default setting). This means that your subnet that you are connecting from will always (well, pretty much always) hit the same webserver in the cluster unless that server is out for some reason.

This will allow your session state to stay on the one server.
0
 

Accepted Solution

by:
CarlosAfonso earned 200 total points
ID: 22914529
Windows Load Balance can be your best solution, but it have some limitations, it works only when all servers are on the same subnet (same mask) you ill set a VIP (virtual IP) then your DNS points only to the VIP.

If I whant to load balance beteen 2 or more datacenters for geographic and network redundancy, Windows load Balance do not solve my problem.

Then DNS round robin and ASP.NET session server or SQL session managemnt will be the right solution for your web application.
0
 

Author Comment

by:jmoriarty
ID: 23009171
Thank you for all the responses. We're just going to end up going the database session route I think, that seems to have the best long term redundancy/capability.

Thanks!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now