473,786 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application object in web farm

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.
Feb 12 '07 #1
7 5636
There's really nothing built-in to handle this. Memcached is a useful and
free tool that we've used before with success:
http://www.danga.com/memcached/

Otherwise, synchronization is a pain...

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Chris Cap" <cc********@new sgroups.nospamw rote in message
news:17******** *************** ***********@mic rosoft.com...
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.
Feb 12 '07 #2
This named-pipes cache service I put together some time ago may be useful to
you:
http://www.eggheadcafe.com/articles/20060404.asp

Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Chris Cap" wrote:
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.
Feb 12 '07 #3
Thanks Peter. My initial thought was to implement either a webservice or
remotedsingleto n 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.
"Peter Bromberg [C# MVP]" wrote:
This named-pipes cache service I put together some time ago may be useful to
you:
http://www.eggheadcafe.com/articles/20060404.asp

Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Chris Cap" wrote:
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.
Feb 12 '07 #4
There is no COM Interop involved in the solution I linked to. Strictly Win32
calls.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Chris Cap" wrote:
Thanks Peter. My initial thought was to implement either a webservice or
remotedsingleto n 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.
"Peter Bromberg [C# MVP]" wrote:
This named-pipes cache service I put together some time ago may be useful to
you:
http://www.eggheadcafe.com/articles/20060404.asp

Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Chris Cap" wrote:
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.
Feb 13 '07 #5
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(applicati on 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 SqlCacheDepende ncy 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/UploadF...ndency01292006
135138PM/sqlcachedepende ncy.aspx?Articl eID=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/subscripti...ult.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/subscripti...t/default.aspx.

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

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

Feb 13 '07 #6
Thanks Steven. That's a good idea and it should be fiarly easy to implement.

"Steven Cheng[MSFT]" wrote:
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(applicati on 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 SqlCacheDepende ncy 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/UploadF...ndency01292006
135138PM/sqlcachedepende ncy.aspx?Articl eID=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/subscripti...ult.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/subscripti...t/default.aspx.

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

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

Feb 14 '07 #7
Just in case: there are several third party products on the market that may
be helpful here. For example, StateMirror (www.statemirror.com) supports
application cache replication.
Apr 25 '07 #8

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

Similar topics

8
2721
by: Google Mike | last post by:
I need an Application object replacement. I was creating my own using shared memory -- shm* API in PHP. I was doing fine for 6 months until it just got too fat, I guess, and the RH9 Linux server just started "losing its memory". I don't know -- perhaps I'm doing something wrong, perhaps it's my code, or perhaps there's a limitation on what I'm trying to do here. It's too many lines of code to debug right now. I'm searching for...
2
1612
by: Martin | last post by:
Hi, I have been trying to find a good article that would explain the scalability of the cache and application variables accross a web farm. I believe that application variables will not scale accross a web farm, however I am undecieded about settings stored in the cache. If anybody can shed any light on this for me or point me in the direction of good articles on the subject then it would help mr a great deal.
1
3308
by: Dominic | last post by:
Hi all, We've just migrated to IIS 6.0 / Windows Server 2003. We are now experiencing some stability problem what we did not experience in IIS 5.0 / Windows 2000 Server. Our ASP.NET application is running in a web-farm environment of multiple web servers. We have been using "Performance Monitor" to monitor the "Requests in Application Queue" counter of "ASP.NET Apps v.1.1.4322" object. We have found the following pattern.
4
1315
by: kanones | last post by:
I have some data that is been retrieved from a call to sql server stored procedure that I want to store for a period of time in a web farm architecture. I want to minimize the calls to sql server as much as possible. Storing it in application cache will result the calls to be made if the users are bounced from one server to another. But is this the best resolution or is there any other methodology that I can use which will be more...
6
1756
by: Eric McVicker | last post by:
Session state has options to be inproc, state server or sql server. Why does Application state not allow for state server or sql server so the same Application state could be shared between servers in a farm?
9
2749
by: Mike | last post by:
Hi, I have the following problem: I have a singleton class that I want to access from asp.net application. The trick is, that I want to create it (Singleton.GetInstance() for the first time) in console application. In other words, I want the following to happen: 1. start console application 2. create object 3. start asp.net and pass the object reference 4. after some time, user surfs to asp.net page, and sees some
5
1455
by: newjazzharmony | last post by:
I want to share one instance of an object across an ASP dot net application, and I'm trying to weigh the pros and cons of the following two approaches: a) Storing the object in ApplicationState b) Storing the object in a static member variable (utilizing a singleton design pattern) Any recommendations on which method would be more suitable? What happens in each of these cases if IIS decides to spawn a new app
10
3056
by: Jamunt | last post by:
Hi, I want to create an application in which around 1000 users will be served at one time. All of the users will be sending around 1 mb of data. I will be parsing that data and would insert some of the data into the database. Is web service right choice for this kind of web applications. What kind of performance problems i might encounter. Will ASP.net is the
6
2618
by: karthi84 | last post by:
Hi, I was asked to create a web application which is going to be running on a web farm. Now my questions are 1. I was asked to use windows authentication for connecting to SQL database, will this work when i am running my application in a web farm? 2. What are the settings i should make to make my application work fine in a web farm environment? 3. I have planned to use a SQL persistant state for sessions, is this the best one or is...
0
9497
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10164
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
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
8992
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...
0
5398
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
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
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
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.