Has anyone configured IIS 6.0 loadbalancing on win 2003 servers with ASP.NET app using InProc Sessions. How can this be achieved?
Has anyone configured IIS 6.0 loadbalancing on win 2003 servers with ASP.NET app using InProc Sessions. How can this be achieved?
If you are using the NLB clustering that ships as part of windows server 2003 then you are looking for the affinty setting. If you set this to "single affinty" then communication from one IP address will always route to the same server, thus allowing the client to get access to the InProc session state. There is some documentation on how to set it at http://technet.microsoft.com/en-us/library/bb734858.aspx
I can't say that I have ever load balanced an IIS 6 server with InProc sessions without using a load balancing device. If you can't use some kind of distributed cache, such as SQL Server or a more performant custom cache, you will probably need to set up some kind of "sticky session" routing in a load balancing device. This allows you to farm out your web sites, but for each user, for the duration of their session, they are repeatedly routed to the same particular server in the farm. This allows you to use InProc sessions, but at the relatively minor cost of not having perfectly ideal load balancing.
Note: You might get better answers for this kind of question over on StackOverflow's sister site: www.ServerFault.com.
It could be achieved depending on how you are balancing.
A lot of balancers will allow you to nominate a cookie as their method for deciding where to direct stick sessions, but it's very dependent on the hardware/software balancer you're using. That's the only way it's going to work for you.
If you are going to plant load balancer, you would need to look at StateServer or SQL Server database. Find out more at http://www.codeproject.com/KB/session/ASPNETSession.aspx.
This article at MSDN Mag titled Build Better Data-Driven Apps With Distributed Caching from explains a lot about how to use Velocity (currently in Community Technology Preview)
The simplest way if you are unable to consolidate state management to ASP.NET State service or SQL Server state database is then to configure your web farm with Windows' NLB.
http://www.west-wind.com/presentations/loadbalancing/networkloadbalancingwindows2003.asp
Yep - I've used load balancing with IIS6. Everyone else has more or less answered the questions though :)
We had a hardware load balancer in the front. This magically determined which IIS6 web server to query. We didn't use sticky sessions and therefore used an ASP.NET State Server (outproc sessions) to handle our sessions. I've not done it, but like other people have suggestion, you'll need sticky session for InProc.
We're now using IIS7 and it still works fine.