![]() |
Do you count the traffic you send somewhere, and how?
One of these days I want to start recording the amount of hits I send to every single sponsor site.
Who's doing this and how? I figure writing it to a mysql table uses a lot of CPU / RAM? If I sent 100K hits a day to 200 sites, would I run 100K mysql update queries on a table with the 200 sites? Won't that tear down my server? Is there a more elegant way to do this, i.e. write to a text file first or whatever? |
Quote:
Quote:
Quote:
|
So a plain "update site_table WHERE site_name='site-name' ..." etc will do?
I haven't done much update queries yet, I am mainly doing selects and thought updates would be much more expensive. Server in question is a Seprom w/ 512MB (and quite busy with just the selects) but getting a Core 2 Duo 2.4 w/ 2GB Ram & Raptor drive soon. |
Quote:
|
Quote:
Code:
UPDATE site_table SET columnCounter = columnCounter + 1 WHERE siteID = 2134; Quote:
|
Thanks nestle & Splum
Would 4GB RAM make sense instead of 2GB? I serve everything dynamic w/mod_rewrite etc. and can barely answer the SE robot queries because the server is at it's limit. I am afraid part of the RAM would be idle all the time if I get 4GB. Would a mysql_query_cache of 2GB make sense and work well (and the remaining 2 GB for Apache etc..) for dynamic page serving (select) and hit tracking (update) w/ mysql? |
I use google analytics javascript tags
|
Quote:
It's serving up to 250K pages/day, all dynamic (php & mysql select) w/ mod_rewrite plus a C app runs about 10 times for each page. Serving a page to a SE bot takes 3-6 seconds. Mysql seems to use most of the RAM, followed by Apache. A bigger server is overdue, but I wondered if I should even plan to include the hit tracking on the same server. Sounds like it should work from what you say. |
Quote:
Also make sure to tweak Mysql to handle heavy loads. http://www.profitpapers.com/papers/p...l-for-load.php |
I will probably get the new server w/ 2 GB Ram and then either add RAm or a 2nd server after I see how it behaves. Thanks everybody
|
I've been doing this for years... I actually track every hit including timestamp and referring URL seperately. It's had 30-40k hits through it in a day with no problems at all... It's not really a product I could sell though, I still get most my daily reports through raw mysql queries via ssh.
|
All times are GMT -7. The time now is 10:19 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123