Reputation: 50355
I have a picture (similar to an ad) in an iframe that will be placed in multiple sites. Should I use the server log file to find out the impression? or should I use DB to keep track of each impression?
which way is faster and can handle large volume of traffic? thanks
Upvotes: 0
Views: 1099
Reputation: 624
Sounds reasonable to me. The simple way with logs could be e.g. to use grep to find the correct calls from the log and count them.
As Knubo said, compressing entries that have already been processed makes sense, as with 10M+/hour you could be looking at quite a log-file :) So e.g. daily do a process which:
Upvotes: 0
Reputation: 8443
The answer for this question really depends on what kind of database you are using, and how busy the web servers disk and the database really are in your deployment environment;
If you have a regular website you can probably get away with doing it the first way as it is simple. If it does not, you haven't spent a lot of time on it.
Upvotes: 1