Application object in web farm

G

Guest

We are considering moving from using several seperate webservers to a web
farm. I was lookingg at implementing a start server to manage state for the
web farm.

The problem is, how do we keep the Application object consistent between all
web servers? As far as I read the state server only manages session state
and not application state.

I would like to avoid setting up our load balancer using sticky. What
options do I have for caching since the Application object may not be valid
if a user has come from a different web server.

How have other people dealt with managing application state.
 
G

Guest

Thanks Peter. My initial thought was to implement either a webservice or
remotedsingleton object to do the same thing. I agree with your esimtation
of webservices or remoting in this regard. However, I am a littlehestitant
to implement something that involves PInvoke simply because my team isn't
that familiar with COM Interop and it would be difficult to maintain.

What is your estimation of using a web service in a similar manner as far as
speed and expandibility?

Thanks for your help, you've given me some great ideas.
 
S

Steven Cheng[MSFT]

Thanks for Peter's input.

Hi Chris,

Peter's namedpipe caching service does have better performance compare to
other distributed computing components. And yes, for your scenario if
you're not quite experienced at unmanaged code interop in .net framework,
it would be a bit difficult to maintain the caching service's code.

I've got an idea on using Sql Server to store the Application state
variables that will be used by all the servers in your webfarm environment.
You can create a dedicated database and table in sqlserver to store the
application state data and in all those webfarm ASP.NET applications, you
just use standard ADO.NET code to query and update the data in SQL Server
database table. One additional benefit here is that you can utilize the
new SQL Server cache dependeny featuer in ASP.NET 2.0. You can regsiter the
sql cache dependency against the central SQL Server database and table in
all those ASP.NET webfarm applications, then, whenever the database
table(application variable data) got changed, those ASP.NET application can
get notified(or detect) and invalid the old cached local copy of the data
and requery the updated data from backend database table. This feature is
supported with both SQL Server 2000 and SQL Server 2005:


#Caching in ASP.NET with the SqlCacheDependency Class
http://msdn2.microsoft.com/en-us/library/ms178604.aspx

#ASP.NET Caching: SQL Cache Dependency With SQL Server 2000
http://www.c-sharpcorner.com/UploadFile/mosessaur/sqlcachedependency01292006
135138PM/sqlcachedependency.aspx?ArticleID=3caa7d32-dce0-44dc-8769-77f8448e7
6bc

#Using SqlDependency in an ASP.NET Application
http://msdn2.microsoft.com/en-us/library/9dz445ks.aspx

Hope this also helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top