Questions about storing state and web farms

N

newjazzharmony

All,

I'd appreciate it if someone could answer these questions for me.
This scenario applies to an ASP dot net application that is deployed in
a web farm.

1) Does the application live in a separate app domain on each
webserver in the farm?

2) Does each webserver's version of the application have its own
Application_Start and Application_End event

3) If I implement a static member variable as singleton in a class and
reference that class in the Web Application, does that mean there will
be a separate copy of this variable on each webserver?

4) What are the pros and cons of using each of the following two
methods to store one instance of an object per web server (I'm assuming
that the answers to 1, 2, and 3 are "yes"):

a) Storing the object in ApplicationState
b) Implementing a static member variable as a singleton as
described above


Thanks!

-Jonathan
 
K

Kevin Spencer

1) Does the application live in a separate app domain on each
webserver in the farm?
Yes.

2) Does each webserver's version of the application have its own
Application_Start and Application_End event
Yes.

3) If I implement a static member variable as singleton in a class and
reference that class in the Web Application, does that mean there will
be a separate copy of this variable on each webserver?
Yes.

4) What are the pros and cons of using each of the following two
methods to store one instance of an object per web server (I'm assuming
that the answers to 1, 2, and 3 are "yes"):

a) Storing the object in ApplicationState
b) Implementing a static member variable as a singleton as
described above

The pros and cons depend on what the object is and what you need to do with
it.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.
 
N

newjazzharmony

The pros and cons depend on what the object is and what you need to do with
Kevin,

Thanks for responding.

The object in question is a dot net class wrapping a COM component.
The class creates an SSL session to a proprietary device that manages
encryption and decryption.
I'm guessing that there is no easy way to manage one instance of this
object across the entire web farm, so I suppose maintaining one
instance on each web server should be sufficient.
Does that help?

Thanks,
-Jonathan
 

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,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top