Solved

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

Posted on 2008-10-22
4
1,322 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:Ted Bouskill
Ted Bouskill 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 SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Learn about cloud computing and its benefits for small business owners.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

929 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

11 Experts available now in Live!

Get 1:1 Help Now