"MongoDB is fantastic for logging". Sounds tempting... high performance inserts, JSON structured records and capped collections if you only want to keep the past X entries. If you care about older historic data but still want to preserve space you could run periodic jobs to roll up log entries in to summarised records. It shouldn’t be too hard to write a command-line script that hooks in to Apache’s logging directive and writes records to MongoDB.
apache hook is a great idea, someone want to write one?
dm - 26th August 2009 21:08 - #
This looks extremely tempting.
I'm currently testing a system where MongoDB is used as a temporary store for statistics sent from JW Player. While I've noticed _some_ performance slowdowns compared to the old system (memcache), the persistency layer is more important.
I wasn't sure what you meant by "logging directive", so I looked at the apache docs a bit, and...
http://httpd.apache.org/docs/2.1/logs.html#piped
Oh, you can have apache pipe to a logging process. That's way better than what I thought people did-- literally tailing the log files and having to do hoops to handle log rotation.
Jeremy Dunck - 27th August 2009 16:53 - #