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 optimized for my purpose?
Any help on this matter is greatly appreciated. 4 1311
It depends on how the data is used. Is it common to all users, or is
different data retrieved for each user?
If it is common to all users, using the ASP.NET Cache is probably the
best option. Yes, it will be retrieved once for each server in a farm,
but that is a pretty low cost to pay.
If the data is specific to each user, you should probably use
out-of-process Session. You can configure session to use the Session
State service or SQL Server in your web.config file. Programmaticall y,
you just use the Session object like you normally do. With
out-of-process session, it wont matter which server in the web cluster
the user is on; their data will be available.
Joshua Flanagan http://flimflan.com/blog
kanones wrote: 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 optimized for my purpose?
Any help on this matter is greatly appreciated.
Thanks for the reply. The data is not user specific so I was leaning towards
application cache but I was concerned because of the web farm architecture
and hence the data being duplicated on the servers. Have you run across any
documentaion on performance metrics for this? Is State Server ONLY for
session/user specific data?
Thanks
Kan
"Joshua Flanagan" wrote: It depends on how the data is used. Is it common to all users, or is different data retrieved for each user? If it is common to all users, using the ASP.NET Cache is probably the best option. Yes, it will be retrieved once for each server in a farm, but that is a pretty low cost to pay. If the data is specific to each user, you should probably use out-of-process Session. You can configure session to use the Session State service or SQL Server in your web.config file. Programmaticall y, you just use the Session object like you normally do. With out-of-process session, it wont matter which server in the web cluster the user is on; their data will be available.
Joshua Flanagan http://flimflan.com/blog
kanones wrote: 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 optimized for my purpose?
Any help on this matter is greatly appreciated.
I don't see duplication of the data on 2 servers as a problem, unless
you expect the data to be updated by users during the execution of the
application. Then it becomes a big problem, as you try to keep the
servers in synch. Using session wouldn't help solve that problem either.
I don't know any specific performance documentation, but I'm pretty sure
you would not want to use the State Server for application wide data,
since it would cause the data to be repeated and stored individually for
each user session.
Remember, you usually only want to cache data results when it more
expensive to retrieve them from the original source. If you start
making a bunch of trips to retrieve the cached data, or use a lot of
memory for it (copying the same values to every session on every
server), you are probably hurting yourself more than helping.
I would not be afraid to make a single call to populate the ASP.NET
cache on each server on a web farm.
kanones wrote: Thanks for the reply. The data is not user specific so I was leaning towards application cache but I was concerned because of the web farm architecture and hence the data being duplicated on the servers. Have you run across any documentaion on performance metrics for this? Is State Server ONLY for session/user specific data?
Thanks Kan
"Joshua Flanagan" wrote:
It depends on how the data is used. Is it common to all users, or is different data retrieved for each user? If it is common to all users, using the ASP.NET Cache is probably the best option. Yes, it will be retrieved once for each server in a farm, but that is a pretty low cost to pay. If the data is specific to each user, you should probably use out-of-process Session. You can configure session to use the Session State service or SQL Server in your web.config file. Programmaticall y, you just use the Session object like you normally do. With out-of-process session, it wont matter which server in the web cluster the user is on; their data will be available.
Joshua Flanagan http://flimflan.com/blog
kanones wrote:
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 optimized for my purpose?
Any help on this matter is greatly appreciated.
Thanks for the reply. It looks like application cache is the way to go. I
was reading up on it specifically with regards to amount of information that
is ideal to store. I was planning on saving a hashtable with about 50
Key-Value pairs in it. Is this a good way ? Or should serialization of the
data be considered? Have you run into any articles with size limitation for
the application cache?
Appreciate a reply.
"Joshua Flanagan" wrote: I don't see duplication of the data on 2 servers as a problem, unless you expect the data to be updated by users during the execution of the application. Then it becomes a big problem, as you try to keep the servers in synch. Using session wouldn't help solve that problem either. I don't know any specific performance documentation, but I'm pretty sure you would not want to use the State Server for application wide data, since it would cause the data to be repeated and stored individually for each user session. Remember, you usually only want to cache data results when it more expensive to retrieve them from the original source. If you start making a bunch of trips to retrieve the cached data, or use a lot of memory for it (copying the same values to every session on every server), you are probably hurting yourself more than helping. I would not be afraid to make a single call to populate the ASP.NET cache on each server on a web farm.
kanones wrote: Thanks for the reply. The data is not user specific so I was leaning towards application cache but I was concerned because of the web farm architecture and hence the data being duplicated on the servers. Have you run across any documentaion on performance metrics for this? Is State Server ONLY for session/user specific data?
Thanks Kan
"Joshua Flanagan" wrote:
It depends on how the data is used. Is it common to all users, or is different data retrieved for each user? If it is common to all users, using the ASP.NET Cache is probably the best option. Yes, it will be retrieved once for each server in a farm, but that is a pretty low cost to pay. If the data is specific to each user, you should probably use out-of-process Session. You can configure session to use the Session State service or SQL Server in your web.config file. Programmaticall y, you just use the Session object like you normally do. With out-of-process session, it wont matter which server in the web cluster the user is on; their data will be available.
Joshua Flanagan http://flimflan.com/blog
kanones wrote:
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 optimized for my purpose?
Any help on this matter is greatly appreciated. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Steve |
last post by:
Hi all i am just starting to get back into VB and i need a little help.
I am writing a program that asks a user to type in a set of numbers/letters
(in this case shipping containers).
Once the data is entered i have my 4 letters and i want to be able to call
up data relating to the 4 letters.
Basically i want it to show who the container belongs to and any other data
i wish to put in there relating to the container.
|
by: Mark |
last post by:
My question is very general, but to properly explain it, i will ask a
specific one.
In our SQL 2000, .NET based application we have as a Device table,
which lists all the devices. That device table has many child tables
storing all kinds of information (Software, Hardware, Windows Events
even). However there is a desire to group many devices into groups.
The devices that belong to a certain group can be hand picked by the
user. Also, we...
|
by: Robert Hanson |
last post by:
I am new to the asp.net application building and I have read the
information regarding the storing of information using session vs
cookies vs viewstate. I am asking for suggestions/guidance as to when
each is appropriate. I noticed that in the case of cookies, there is a
liability because of web browser settings migh disallow the storing of
cookies.
Thanks in advance,
Bob Hanson
|
by: Ritu |
last post by:
How to store connection strings in machine.config?What are the
advantages of storing it in the machine.config file.Can u provide me
with the information regarding accessibility of machine.config
file,meaning thereby,who can access thisfile and who cannot.An early
reply would be appreciated.
|
by: Frankie |
last post by:
Using SQL Server 2005 and .NET 2.0; I'm creating a Windows Forms application
that will need to display photos of people, along with a bunch of
information about each person.
In a Web application, there is a generally accepted "best practice" of
storing only a string (the path to the .jpg file name), with the actual file
stored in an NTFS folder (and not in the database).
What's the standard practice for Windows Forms applications? Is...
| |
by: (PeteCresswell) |
last post by:
User wants to go this route instead of storing pointers in the DB and the
documents outside.
Only time I tried it was with only MS Word docs - and that was a loooong time
ago - and it seemed to me like there were performance issues at the time.
How about the different types? The MS docs I would expect Access to
differentiate and handle appropriately (i.e. .DOC and .XLS).. but how about
..PDF? and can I stash a .TXT document in the...
|
by: Mark |
last post by:
I'm consuming a webservice that makes a simple object available. The object
class is marked in the web service as . I have a web
application that consumes and uses this web service's class. When I receive
the object from the web service, I'm interested in storing that object in
ViewState in the web application, but I receive the error below. I'm not
shocked that the web application can't serialize the object as the
attribute isn't...
|
by: KarlM |
last post by:
After reading some articles regarding confuguration data I'm a bit confused.
Where is the right place for storing configuration data?
- XML-files?
- registry?
- INI-files? (from a users point of view, ini-files are more comfortable to
read and edit)
Where should I store user specific config data?
Where should I store machine specific config data?
|
by: Andy Fish |
last post by:
Hi,
Is there anywhere inside the HttpRequest object that I can use to store my
own information? from what I can see things like ServerVariables are made
read-only.
If not, does anyone else have a sensible strategy for storing information
that pertains to a particular request so that it can be shared between
global.asax handlers and the page itself? I cannot use session state for
this.
|
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...
|
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...
| |
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,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |