Hello,
What is the best way to accomplish the following.
1) An ASP.NET program (consiting of one file somepage.aspx) receives about
25,000,000 requests pay day.
2) The requests come from a limited set of IP addresses.
3) How to count the total number of request from each IP address per day.
SQL Server 2000 is used on the backend.
Currently we used the following architecture:
* Each request to somepage.aspx generates an INSERT into a LogTable1
* There is a clustered index on the LogTable1 on the dateStamp field which
is of the type smalldatetime
* The dateStamp field has a default that sets it to the getdate()
* At the end of each day at 12:01AM there is a simple query that runs and
does a group by to count the number of requests from each IP in the given
date range (past 24 hours). This query works great and takes only 2 minutes
to run.
Is there a better way to accomplish this without having to do INSERTS into
the LogTable1 for each request?
It would not work to have the ASP.NET program execute an UPDATE each time to
increment the total number of request, since this would cause LOTSSS of
locking in the database layer.
Thanks in advance.
Arsen 5 1490
You could store the data in your Application Cache, and update it
periodically to the database.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Arsen V." <ar************ ****@emergency2 4.com> wrote in message
news:em******** ******@TK2MSFTN GP09.phx.gbl... Hello,
What is the best way to accomplish the following.
1) An ASP.NET program (consiting of one file somepage.aspx) receives about 25,000,000 requests pay day.
2) The requests come from a limited set of IP addresses.
3) How to count the total number of request from each IP address per day.
SQL Server 2000 is used on the backend.
Currently we used the following architecture:
* Each request to somepage.aspx generates an INSERT into a LogTable1 * There is a clustered index on the LogTable1 on the dateStamp field which is of the type smalldatetime * The dateStamp field has a default that sets it to the getdate() * At the end of each day at 12:01AM there is a simple query that runs and does a group by to count the number of requests from each IP in the given date range (past 24 hours). This query works great and takes only 2
minutes to run.
Is there a better way to accomplish this without having to do INSERTS into the LogTable1 for each request?
It would not work to have the ASP.NET program execute an UPDATE each time
to increment the total number of request, since this would cause LOTSSS of locking in the database layer.
Thanks in advance.
Arsen
Hi,
What about using the IIS log file?
you could set it in the way you need it, basically the client IP and maybe
the time, if you configure it to update daily all you have to do at 12:01
is run a process that read the file generated and do what you need.
Cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Arsen V." <ar************ ****@emergency2 4.com> wrote in message
news:em******** ******@TK2MSFTN GP09.phx.gbl... Hello,
What is the best way to accomplish the following.
1) An ASP.NET program (consiting of one file somepage.aspx) receives about 25,000,000 requests pay day.
2) The requests come from a limited set of IP addresses.
3) How to count the total number of request from each IP address per day.
SQL Server 2000 is used on the backend.
Currently we used the following architecture:
* Each request to somepage.aspx generates an INSERT into a LogTable1 * There is a clustered index on the LogTable1 on the dateStamp field which is of the type smalldatetime * The dateStamp field has a default that sets it to the getdate() * At the end of each day at 12:01AM there is a simple query that runs and does a group by to count the number of requests from each IP in the given date range (past 24 hours). This query works great and takes only 2
minutes to run.
Is there a better way to accomplish this without having to do INSERTS into the LogTable1 for each request?
It would not work to have the ASP.NET program execute an UPDATE each time
to increment the total number of request, since this would cause LOTSSS of locking in the database layer.
Thanks in advance.
Arsen
Hi Kevin,
Do you suggest storing the TOTALs in the Cache?
Or storing the actual requests: date and ip
Would there be a locking problem?
How to do the "periodic updates" to the database from the Cache?
Thanks,
Arsen
"Kevin Spencer" <ke***@takempis .com> wrote in message
news:ez******** ******@TK2MSFTN GP12.phx.gbl... You could store the data in your Application Cache, and update it periodically to the database.
-- HTH, Kevin Spencer .Net Developer Microsoft MVP Big things are made up of lots of little things.
"Arsen V." <ar************ ****@emergency2 4.com> wrote in message news:em******** ******@TK2MSFTN GP09.phx.gbl... Hello,
What is the best way to accomplish the following.
1) An ASP.NET program (consiting of one file somepage.aspx) receives
about 25,000,000 requests pay day.
2) The requests come from a limited set of IP addresses.
3) How to count the total number of request from each IP address per
day. SQL Server 2000 is used on the backend.
Currently we used the following architecture:
* Each request to somepage.aspx generates an INSERT into a LogTable1 * There is a clustered index on the LogTable1 on the dateStamp field
which is of the type smalldatetime * The dateStamp field has a default that sets it to the getdate() * At the end of each day at 12:01AM there is a simple query that runs
and does a group by to count the number of requests from each IP in the
given date range (past 24 hours). This query works great and takes only 2 minutes to run.
Is there a better way to accomplish this without having to do INSERTS
into the LogTable1 for each request?
It would not work to have the ASP.NET program execute an UPDATE each
time to increment the total number of request, since this would cause LOTSSS of locking in the database layer.
Thanks in advance.
Arsen
Hi Arsen,
You could put a DataTable in the Application Cache, and add records to it
with each Request. As for periodic updating, you could put a routine in the
Session_OnStart Sub that checks an Application DateTime variable, and at
certain intervals, inserts all the records from the DataTable into the
database and clears out the DataTable.
To be safe, you would want to add code to your Application_OnE nd sub to
update the database if the Application stops or times out; however, with 25M
requests per day, that might not be necessary.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Arsen V." <ar************ ****@emergency2 4.com> wrote in message
news:#d******** ******@tk2msftn gp13.phx.gbl... Hi Kevin,
Do you suggest storing the TOTALs in the Cache?
Or storing the actual requests: date and ip
Would there be a locking problem?
How to do the "periodic updates" to the database from the Cache?
Thanks, Arsen
"Kevin Spencer" <ke***@takempis .com> wrote in message news:ez******** ******@TK2MSFTN GP12.phx.gbl... You could store the data in your Application Cache, and update it periodically to the database.
-- HTH, Kevin Spencer .Net Developer Microsoft MVP Big things are made up of lots of little things.
"Arsen V." <ar************ ****@emergency2 4.com> wrote in message news:em******** ******@TK2MSFTN GP09.phx.gbl... Hello,
What is the best way to accomplish the following.
1) An ASP.NET program (consiting of one file somepage.aspx) receives about 25,000,000 requests pay day.
2) The requests come from a limited set of IP addresses.
3) How to count the total number of request from each IP address per day. SQL Server 2000 is used on the backend.
Currently we used the following architecture:
* Each request to somepage.aspx generates an INSERT into a LogTable1 * There is a clustered index on the LogTable1 on the dateStamp field which is of the type smalldatetime * The dateStamp field has a default that sets it to the getdate() * At the end of each day at 12:01AM there is a simple query that runs and does a group by to count the number of requests from each IP in the given date range (past 24 hours). This query works great and takes only 2 minutes to run.
Is there a better way to accomplish this without having to do INSERTS into the LogTable1 for each request?
It would not work to have the ASP.NET program execute an UPDATE each time to increment the total number of request, since this would cause LOTSSS
of locking in the database layer.
Thanks in advance.
Arsen
what i have done is cache the last 15 minutes. the cache has the ipaddress,
the start of the 15 min interval, pagename, and number of hits during the
interval. as most users cluster their hits, this cuts down the number of
inserts.
i flush the cache every 15 minutes of when too large.
you can then get daily or hourly stats from the db with simple queries.
-- bruce (sqlwork.com)
"Arsen V." <ar************ ****@emergency2 4.com> wrote in message
news:em******** ******@TK2MSFTN GP09.phx.gbl... Hello,
What is the best way to accomplish the following.
1) An ASP.NET program (consiting of one file somepage.aspx) receives about 25,000,000 requests pay day.
2) The requests come from a limited set of IP addresses.
3) How to count the total number of request from each IP address per day.
SQL Server 2000 is used on the backend.
Currently we used the following architecture:
* Each request to somepage.aspx generates an INSERT into a LogTable1 * There is a clustered index on the LogTable1 on the dateStamp field which is of the type smalldatetime * The dateStamp field has a default that sets it to the getdate() * At the end of each day at 12:01AM there is a simple query that runs and does a group by to count the number of requests from each IP in the given date range (past 24 hours). This query works great and takes only 2
minutes to run.
Is there a better way to accomplish this without having to do INSERTS into the LogTable1 for each request?
It would not work to have the ASP.NET program execute an UPDATE each time
to increment the total number of request, since this would cause LOTSSS of locking in the database layer.
Thanks in advance.
Arsen
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: oshanahan |
last post by:
Does anyone have ideas on the best way to move large amounts of data
between tables? I am doing several simple insert/select statements
from a staging table to several holding tables, but because of the
volume it is taking an extraordinary amount of time. I considered
using cursors but have read that may not be the best thing for this
situation. Any thoughts?
--
Posted using the http://www.dbforumz.com interface, at author's request...
|
by: Terry E Dow |
last post by:
Howdy,
I am having trouble with the objectCategory=group member.Count attribute.
I get one of three counts, a number between 1-999, no member (does not
contain member property), or 0. Using LDIFDE as a comparison I get the same
results. No members means just that, an empty group. Zero means that the
DirectorySearcher.SizeLimit has been exceeded....
|
by: Matthew Groch |
last post by:
Hi all,
I've got a server that handles a relatively high number of concurrent
transactions (on the magnitude of 1000's per second). Client
applications establish socket connections with the server. Data is
sent and received over these connections using the asynchronous model.
The server is currently in beta testing. Sporadically over the course
of the day, I'll observe the thread count on the process (via perfmon)
start climbing....
|
by: Arsen V. |
last post by:
Hello,
What is the best way to accomplish the following.
1) An ASP.NET program (consiting of one file somepage.aspx) receives about
25,000,000 requests pay day.
2) The requests come from a limited set of IP addresses.
3) How to count the total number of request from each IP address per day.
|
by: Ciaran |
last post by:
Hi I've seen this a few places - The site lists off the number of
people (not logged in) currently browsing the site. How can I do this
with php / mySQL please?
| |
by: laziers |
last post by:
Hi,
What kind of data access you will use for the project with very large
database :
1. NHibernate
2. Linq
3. Sql queries + stored procedures
4. DataSets
|
by: jty0734 |
last post by:
i wanna large divide.
input is 1~1024 bit integer.
first, i think using sub is solution.
so i made two array. and sub divisor to dividend.
but this situation happen.
|
by: AAaron123 |
last post by:
trying to understand the below shown code.
After this is run the browser opens a file-save dialog box for saving the
file.
I wonder how it knows I want the file saved?
But more important, the dialog box has as the default file name the name of
this ashx file.
I'd like to make that name more meaningfull but don't know how it gets set.
I'm looking for a Response.Write but don't find one. Maybe that why the
|
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: 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,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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: 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...
|
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: 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
| |