Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Active Server Pages (ASP)
Expertise: Beginner
Mar 24, 2000

Sessions Do Not Work on Web Server Farms

Question:

How do sessions work with clustered NT servers? How do you make use of clustering technology if an NT machine goes down along with its sessions? Is NT smart enough to know to replicate these sessions in other servers and route all requests to these other servers?

Answer:

Sessions are specific to a Web server and are not supported across machines. When you use clustered NT servers (I assume you mean a Web server farm, where a number of servers having identical Web content serve the same domain name URL), you cannot use session variables. In a Web farm scenario, a load-balancing device—either a hardware or software component—intercepts the request for a Web page and passes it on to one of the available Web servers based on which server has the least load. This way, even if a Web server goes down, the other servers will absorb the load.

If you want to use Web farms efficiently, you will need to create stateless applications with no session variables. If you do wish to use session variables then you will need to make sure that the load-balancing device that you have (hardware or software) always routes the browser request to the same machine so that the session can be maintained. But that defeats the whole purpose of creating a server farm. If that particular machine goes down, for that user, your Web site has gone down. Bottom line: start thinking, designing, and developing stateless applications.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date