vote up 2 vote down star
3

Has anyone configured IIS 6.0 loadbalancing on win 2003 servers with ASP.NET app using InProc Sessions. How can this be achieved?

flag

7 Answers

vote up 1 vote down

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.

link|flag
Do you have any tips about where I can read about "some kind of distrubuted cache"? =) – Carl Bergquist Jun 4 at 10:01
vote up 1 vote down

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 dependant on the hardware/software balancer you're using. That's the only way it's going to work for you.

link|flag
vote up 1 vote down

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

link|flag
vote up 0 vote down

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)

link|flag
vote up 0 vote down

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

link|flag
vote up 0 vote down

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.

link|flag
vote up -1 vote down

InProc is for single server.

If you are going to plant load balancer, you would need to look at State Server or Sql Server Database. Find out more at

http://www.codeproject.com/KB/session/ASPNETSession.aspx

link|flag
Not true, you can use InProc sessions provided that the load balancer uses cookies or source IP address to always send the same user to the same server. (However if a server falls over then the session data is lost.) – Ian Ringrose Aug 5 at 15:20

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.