473,692 Members | 2,231 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session ID and Cluster / Network Load Balancing

I am running two servers with a hardware network load balancing device. I
know that to share session information between the two servers I need to
implement some type of SQL based session information, but I would simply
like to share the SessionID. Mainly for some logging applications.

The SessionID does currently seem to be shared between the two servers and I
haven't changed anything with my configuration or implemented anything
specific to this in my program. Does this seem normal or am I missing
something?

I just want to make sure that if it is working correctly, it will continue
to do so.

I already have the same machine key on both machines if that is of any
relevance.

Thanks,

-Andrew
Nov 19 '05 #1
6 4057
What type of session management is configured in your Web.Config? How can
you tell the sessions are shared? Are you sure that when you go to the site,
you are not hitting the same webserver everytime which would make it appear
as though the session is shared.

S

"Andrew Robinson" <ne****@nospam. nospam> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
I am running two servers with a hardware network load balancing device. I
know that to share session information between the two servers I need to
implement some type of SQL based session information, but I would simply
like to share the SessionID. Mainly for some logging applications.

The SessionID does currently seem to be shared between the two servers and
I
haven't changed anything with my configuration or implemented anything
specific to this in my program. Does this seem normal or am I missing
something?

I just want to make sure that if it is working correctly, it will continue
to do so.

I already have the same machine key on both machines if that is of any
relevance.

Thanks,

-Andrew

Nov 19 '05 #2
I am not saying that the sessions are shared only that it appears that the
session ids on both servers for a given client are the same. I have been
logging them and if they were different, they should be showing up as so 50%
of the time.

is the session ID in some way tied to the machine key? (which is the same on
both machines)

this is good enough for me but I just want some confirmation that I am
seeing things correctly.

-Andrew

"Steve Lutz" <sl***@nospam.c omcast.net> wrote in message
news:uC******** ******@TK2MSFTN GP09.phx.gbl...
What type of session management is configured in your Web.Config? How can
you tell the sessions are shared? Are you sure that when you go to the
site, you are not hitting the same webserver everytime which would make it
appear as though the session is shared.

S

"Andrew Robinson" <ne****@nospam. nospam> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
I am running two servers with a hardware network load balancing device. I
know that to share session information between the two servers I need to
implement some type of SQL based session information, but I would simply
like to share the SessionID. Mainly for some logging applications.

The SessionID does currently seem to be shared between the two servers
and I
haven't changed anything with my configuration or implemented anything
specific to this in my program. Does this seem normal or am I missing
something?

I just want to make sure that if it is working correctly, it will
continue
to do so.

I already have the same machine key on both machines if that is of any
relevance.

Thanks,

-Andrew


Nov 19 '05 #3
Hi Andrew,

As for the SESSIONID shared in cluster/loadbalance scenario, are you using
the asp.net's buildin formsauthentica tion or just using the SESSIONID to
build your custom form-based(cookie) authentication?

As far as I know, for cluster /load balance scenario, SQLServer session
mode is one approach for sharing session. And SessionID should be OK
regardless of the session mode sicne by default sessionid are stored in
cookie(if cookie not disabled at cilentside).

#How to use ASP.NET session state SQL Server Mode in a failover cluster
http://support.microsoft.com/default...b;en-us;323262

Also, for cluster it seems provide the means for us to always redirect the
same client to a fixed webserver (if using in memory session) so as to
avoid multi-server session sharing problem:

#How To Handle Web Client Session State in an Application Center 2000
Cluster
http://support.microsoft.com/default...b;en-us;286279

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #4
I think we are making things too complicated here....

We are using a hardware based load balancing device. It randomly distributes
load. There is no affinity for clients and I am not sure that we can change
that.

All I want to know is that it appears that the Session ID is the same on
clients for both machines. This surprises me. Is the Session ID tied in any
way to the Machine ID in the Machine.Config file? It is the only thing on
the servers that has been changed to be identical.

I have no need to share actual session informaiton between the two machines,
but I am utalizing the Session ID to track some client activity.

Does this all make sense?
-Andrew

""Terry Fei[MSFT]"" <v-******@microsof t.com> wrote in message
news:VX******** ********@TK2MSF TNGXA01.phx.gbl ...
Hi Andrew,

As for the SESSIONID shared in cluster/loadbalance scenario, are you using
the asp.net's buildin formsauthentica tion or just using the SESSIONID to
build your custom form-based(cookie) authentication?

As far as I know, for cluster /load balance scenario, SQLServer session
mode is one approach for sharing session. And SessionID should be OK
regardless of the session mode sicne by default sessionid are stored in
cookie(if cookie not disabled at cilentside).

#How to use ASP.NET session state SQL Server Mode in a failover cluster
http://support.microsoft.com/default...b;en-us;323262

Also, for cluster it seems provide the means for us to always redirect the
same client to a fixed webserver (if using in memory session) so as to
avoid multi-server session sharing problem:

#How To Handle Web Client Session State in an Application Center 2000
Cluster
http://support.microsoft.com/default...b;en-us;286279

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #5
Andrew,

It seems that you would be better off requesting support
from the manufacturer of your hardware load balancing
device, which you haven't identified so far.

There's no way that, without knowing the particulars about the
configurational possibilities for your hardware load balancing device,
you could get an answer to an open-ended question like the one you've made.

Hardware load balancing devices vary widely in regards
to their capabilities and possible troubleshooting techniques.

Fire off an email to your hardware load balancer's manufacturer.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espańol
Ven, y hablemos de ASP.NET...
=============== =======

"Andrew Robinson" <ne****@nospam. nospam> wrote in message
news:ea******** *****@TK2MSFTNG P12.phx.gbl...
I think we are making things too complicated here....

We are using a hardware based load balancing device. It randomly distributes load. There
is no affinity for clients and I am not sure that we can change that.

All I want to know is that it appears that the Session ID is the same on clients for
both machines. This surprises me. Is the Session ID tied in any way to the Machine ID in
the Machine.Config file? It is the only thing on the servers that has been changed to be
identical.

I have no need to share actual session informaiton between the two machines, but I am
utalizing the Session ID to track some client activity.

Does this all make sense?
-Andrew

Nov 19 '05 #6
Hi Andrew,

Not very sure on your hardware loadbalance implementation, however, IMO, if
that hardware loadbalance does hidden the underlying things from ASP.NET's
perspective, and as you said , the applciation on different end server did
share sessionIDs, I think it'll be ok. Because sessionid are simply stored
in cookie at clientside and the hardware load balancing device will expose
the same hostname (url) to the clientside, the same cookie path will be
searched no matter which end server is actually redirected to. How do you
think ?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3629
by: Jeff | last post by:
We're running a fairly busy and complex e-commerce website. It's an online retailer. We utilize MySQL for most of our site-based dynamic data, and then we use Oracle to access inventory and place orders. We have two seperate machines for database and web application (reasonably powerful dual xeon 3ghz machines, 6gb ram each). We're running Apache 1.3.28 with PHP 4.3.3, mod_ssl 2.8.15 and OpenSSL 0.9.6b. We are running MySQL 4.0.16 as our...
3
5306
by: Max | last post by:
Frankly, i need session variables to persist regardless of load balancing. My hoster says save them in files, yuk. Are there any other thoughts The problem is that the session variables are lost when the load is switched to another server. Also, i am locked out, because there is now a cookie on my PC that will not expire until the timeout has expired? Max
1
4310
by: Robert | last post by:
In Web.config file is a setting for sessionState. If I want to maintain a users' session state (ie use the Session object) in a web farm that is being load balanced by a Cisco CSS 11501 Switch. How do I setup sessionState so anything saved to the Session object stays with that session no matter what web server they get bounced around to?
31
6992
by: Harry Simpson | last post by:
I've come from the old ASP camp where session variables were not used. When i started using ASP.NET in 2001, I started using them again because it was ok from what I'd read. I've been merrily using Session variables for three years now and i'm entering a project with my new boss who has never quite come around that session variables are ok. What's the concensus here. How can i convince him that they are ok in ASP.NET. OR
0
2106
by: SeanGallavan | last post by:
Our Environment: Two network load balanced (using Microsoft NLB software) webservers with session maintained in a SQL Server database. NLB is configured with no affinity settings and two network cards in each machine. Machine keys are identical on both webservers. There is no anti-virus software installed. SQL Server database is storing session information as specified by Microsoft guidelines.
1
1756
by: Nit | last post by:
need the concpet of load balancing cluster ? can any one help me out with any link....?
1
2264
by: m.a | last post by:
Hello, I am looking for a hosting solution for my asp.net application. I found that some ISP stated that session states are not preserved in a load balancing system. As I know, if the asp.net is configured to save the session states in SQL server or file system, it would be preserved in load balancing systems. What is the whole story from the hosting point of view?
1
2733
by: =?Utf-8?B?VmlqYXkgQ2hpa3Rl?= | last post by:
Hi Experts, With Session Affinity and Web Server Farm on ISA Server 2006 accessing 2 backend IIS servers, I’m getting error “Validation of ViewState MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKeyconfiguration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster”. Here is the scenario when I got the error.
1
3135
by: barunva | last post by:
Hi, We would like to know whether the Clustering and Load balancing features of Apache tomcat server are working across the Clusters or not. If it is working, is it possible to have the following setup across the Cluster, 1. Assume there is no NFS filesystem across cluster
0
8610
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9090
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8810
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7633
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6462
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4327
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4562
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2978
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2242
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.