473,386 Members | 1,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

detect high server load and switch to text only mode

I have a site that sometimes gets extremely high server loads. I would
like to make it so if the sustained server load is very high (million
page views per hour) then it will switch to text only mode. My question
is, what is the most reliable way to detect page views per hour
programatically. I do NOT want to read the IIS logs. But
writing/reading performance stats from performance counter is ok. I
also do not want to slow down the server by inserting a sql record for
every page view!! that would be counter productive!

Jan 2 '06 #1
1 1641
A pretty "reliable" way is to keep either a static set of counter variables
in Global class (global.asax) or even store them in Application State. You
could have a lastUpdateTime and a StartTime and get your "counts per hour"
with a simple formula. Each hour, you could reset the StartTime and so you
would have a reasonably reliable way to know how many requests per hour. Use
the Application_BeginRequest event to increment your counter.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"th*****************@yahoo.com" wrote:
I have a site that sometimes gets extremely high server loads. I would
like to make it so if the sustained server load is very high (million
page views per hour) then it will switch to text only mode. My question
is, what is the most reliable way to detect page views per hour
programatically. I do NOT want to read the IIS logs. But
writing/reading performance stats from performance counter is ok. I
also do not want to slow down the server by inserting a sql record for
every page view!! that would be counter productive!

Jan 2 '06 #2

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

Similar topics

17
by: Guyon Morée | last post by:
what is the difference? if I open a text file in binary (rb) mode, it doesn't matter... the read() output is the same.
2
by: Jürgen Holly | last post by:
Hi! I have the following xml-node: <docu> <p>Sample: <b>bold</b></p> <p>and text in <i>italic</i></p> </docu> I need to create a text-file, so I set the output-mode to text.
0
by: Angelke | last post by:
Hi all I am making a website for my brother in asp and it uses quite a lot of database connections. The problem is after a while (few days recently) the server load gets to 100% and the site...
0
by: Renato Cramer | last post by:
Hi All, Someone will can say me anything about the Tony Bourke's book "Server Load Balancing"? I need study these subjects. Any recommendation? Thanks in advance. Renato Cramer.
1
by: Steve.Goodman | last post by:
Appologies if this has already been asked, but after scanning the web and this news group I could find no decent solution. We have a windows App that calls a webservice, using this bit of basic...
3
by: ewunia | last post by:
I am running the tagboard service on my server. Few months ago I bought the new dedicated server with Dual Xeon 3.2 GHz and 2GB Ram. The board is written in PHP with Mysql. Not long ago I updated...
10
by: Kenneth Brody | last post by:
I recently ran into an "issue" related to text files and ftell/fseek, and I'd like to know if it's a bug, or simply an annoying, but still conforming, implementation. The platform is Windows,...
1
by: mrjaune | last post by:
Hi Everyone, I try to load a text file into a listview. Here is my text file: 10 "Babar" 9 6 15 "Robert" 3
0
by: sagarkchuri | last post by:
What will be MSSQL Query to switch recovery mode ?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
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...

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.