Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 286279 - Last Review: July 1, 2004 - Revision: 1.2
How To Handle Web Client Session State in an Application Center 2000 Cluster
This article was previously published under Q286279
SUMMARY
Application Center 2000 does not replicate client state, including Active Server Pages (ASP) session variables, between cluster members. If you are using ASP session variables or otherwise storing client session state on your Web server, you must either redesign your application to store client session state off of the Web server (recommended) or take steps to guarantee that clients will always use the same server for an entire session.
MORE INFORMATION
If you can design your application so that it does not store per-client state on the Internet Information Server (IIS) server, you will maximize your application's performance in any load-balanced Web cluster environment. If you must use ASP session variables or other techniques that store per-client session state on the IIS server, either in memory or on disk, then you must use one or more of the following techniques to make sure that your clients always connect to the same IIS server for the duration of their session:
- Set your IP load balancer to lock clients (or client sessions) to a single IIS server. This is sometimes known as "sticky session" support.
If you are using network load balancing (NLB), you should use either single affinity (the default setting when you allow Application Center 2000 to configure NLB for you) or class C affinity. You should use single affinity if your client's IP addresses don't change during a session, which is usually the case for intranet clients. You should use class C affinity if your client's IP addresses can change during a session. This can happen when your clients are behind clusters of proxy servers or other address translation devices. This is almost always the case when your application is directly exposed to the Internet.
You can use the Application Center 2000 administrative snap-in to check or set NLB affinity. To do so:
- Right-click the cluster name and select Properties.
- Select NLB Client affinity: Intranet (Single) for single affinity.
- Select NLB client affinity: Internet (Class C) for class C affinity.
- Click OK.
Note that some proxy server clusters on the Internet allow client addresses to change over several different class C ranges, so you must also configure Application Center 2000 request forwarding (as described in the following bullet) if you are using NLB for an Internet application that requires session variables. - Enable Application Center request forwarding. Application Center supplies a global Internet Server API (ISAPI) filter and extension that uses the management NICs to route client traffic to the correct server whenever your IP load balancer sends a client request to another server.
NOTE: Request forwarding is a time consuming operation and can degrade performance if it is heavily used, which is why it is disabled by default. You can enable and configure Application Center request forwarding through the Application Center administrative snap-in:
- Right-click the cluster name and select Properties.
- Click the Request Forwarding tab.
- Select Enable Web request forwarding.
- If you are using ASP session variables and do not store any other client session state on your Web server, select Enable for Web sites using ASP session state only.
If you use methods besides ASP session variables to store client session state on your Web servers, select Enable for all Web sites. - Click OK.
REFERENCES
For additional information on ways to design your application to maintain state without using session variables, click the article number below
to view the article in the Microsoft Knowledge Base:
175167Â
(http://kbalertz.com/Feedback.aspx?kbNumber=175167/EN-US/
)
How To Store State in Active Server Pages Application
If your applications use COM components, you may have to redesign them as well. For additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
243548Â
(http://kbalertz.com/Feedback.aspx?kbNumber=243548/EN-US/
)
INFO: Design Guidelines for VB Components Under ASP
There is a general discussion of session state management on the following MSDN Online Web Workshop site:
The October 2000 edition of MSDN Magazine includes an article on how to store session state on Microsoft SQL Server, "Taming the Stateless Beast: Managing Session State Across Servers on a Web Farm":
APPLIES TO
- Microsoft Application Center 2000 Standard Edition
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate
Be the first to leave feedback, to help others about this knowledge base
article.
(Optional) Name
(Optional)
Public URL Or Email
Comments
No
HTML -- Text Only Please