Storing Web stats to DB

S

sameergn

Hi,

We have 2 Apache + 9 tomcats running in production. The application
does not use basic or form based authentication, but manages its own
form-based authentication.

We want to capture access log statistics plus some JVM level stats
like memory in use, active threads, HTTP sessions, No. of DB
connections opened by our custom Connection Pooler.

Our approach is to write a servlet filter to capture per request stats
and store it in a HashMap wrapped inside a ThreadLocal object. The
application code can then add more values to this map. At the end of
the filter, this map will be copied to a vector and a daemon thread
will flush this vector to DB periodically.

We could have chosen method of processing access log files, but then
we have to handle 9 of them, the user id is not available in the log,
JVM stats are not available and there will be delay of one day till
the access log is rotated and flushed to DB by a CRON job.

Has anybody tried this approach or anything better? Our concern is in
situation when load spikes up on the web site, will additional memory
required to store the stats have any adverse impact on performance.
Also, the data storage requirements will be huge as we get close to
million hits per day. We are thinking of summarizing and purging data
that is, say a month older.

Thanks,
Sameer.

PS: Is this an appropriate group for this discussion?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top