Storing Web stats to DB

Discussion in 'Java' started by sameergn@gmail.com, Mar 6, 2007.

  1. Guest

    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?
     
    , Mar 6, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Utter Newbie
    Replies:
    0
    Views:
    474
    Utter Newbie
    Jul 28, 2003
  2. Dan
    Replies:
    0
    Views:
    353
  3. xyZed
    Replies:
    3
    Views:
    1,366
    Jacqui or (maybe) Pete
    Jun 29, 2003
  4. toton
    Replies:
    11
    Views:
    721
    toton
    Oct 13, 2006
  5. Jonathan Wood
    Replies:
    1
    Views:
    522
    Jonathan Wood
    Jun 2, 2008
Loading...

Share This Page