Microsoft KB Archive/286279

From BetaArchive Wiki
Knowledge Base


How To Handle Web Client Session State in an Application Center 2000 Cluster

Article ID: 286279

Article Last Modified on 7/1/2004



APPLIES TO

  • Microsoft Application Center 2000 Standard Edition



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:

    1. Right-click the cluster name and select Properties.
    2. Select NLB Client affinity: Intranet (Single) for single affinity.
    3. Select NLB client affinity: Internet (Class C) for class C affinity.
    4. 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:

    1. Right-click the cluster name and select Properties.
    2. Click the Request Forwarding tab.
    3. Select Enable Web request forwarding.
    4. 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.
    5. 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 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 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":

Keywords: kbhowto KB286279