Web Farm question.

A

ashish

We are trying to run an application on a web farm, with sql server state
management, the issue is that the application uses a singleton static
class to access configuration information.

The issue is that when the state of the object can be different on
different web servers , is there any mecahnism in ASP.NET, like storing
something in the Application object, which can help in synchronizing
this class across web servers ?

any help would be greatly appreciated.

regards
-ashish
 
B

bruce barker

the short answer is no, other than always loading the data from the state
server.

but with sqlserver you can use its notification services to implement a
trigger for the singleton.

in the past i've implemented a distributed lock manager to maintain
configuration state across a web farm. i use udp for the keepalive and
quorum votes. to update data, the master node takes a update lock, (which
invalids the data on the slaves), updates it data, and releases the lock.
the lock release, the slaves know their copy is invalied and will all
refetch the data from the master (or its source).

-- bruce (sqlwork.com)


| We are trying to run an application on a web farm, with sql server state
| management, the issue is that the application uses a singleton static
| class to access configuration information.
|
| The issue is that when the state of the object can be different on
| different web servers , is there any mecahnism in ASP.NET, like storing
| something in the Application object, which can help in synchronizing
| this class across web servers ?
|
| any help would be greatly appreciated.
|
| regards
| -ashish
 
A

Alvin Bruney [Microsoft MVP]

well if you are using sql server to begin with, why not store the
configuration information in the database? That would seem a reasonable,
scalable approach to me. Config files are machine specific by default and
application specific in the extreme. Either way, it doesn't bode well for
web farm type scenarios. That's about all i can think of at this point, if
the light comes on later, i'll be sure to post something.

--
Regards
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
 
G

Guest

What about using the Cache class for that? Need to check right now, but I
believe that will work between computers

Need to check, and I'll post some code later on.
 
A

Alvin Bruney [Microsoft MVP]

yup you could but it requires a change to the config file to force the
servers in the farm to have the same machine authentication key, then you
would need to remove the isolateapps section of the config file - that
modication was introduced in 1.1, it does not exist for 1.0. If memory
serves me, it is the machinekey node in the machine config file that you
need to address.

--
Regards
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
 
G

Guest

Great, that's what I wanted to know. So If they have the sames config file
with the same authentication key Cahe will be global.

Thanks so much for your response!

Al

Alvin Bruney said:
yup you could but it requires a change to the config file to force the
servers in the farm to have the same machine authentication key, then you
would need to remove the isolateapps section of the config file - that
modication was introduced in 1.1, it does not exist for 1.0. If memory
serves me, it is the machinekey node in the machine config file that you
need to address.

--
Regards
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
--------------------------------------------------


Albert Pascual said:
What about using the Cache class for that? Need to check right now, but I
believe that will work between computers

Need to check, and I'll post some code later on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,079
Latest member
ElidaWarin

Latest Threads

Top