Comparing Mongo DB and Couch DB
mongodb.org
mongodb.org
Anybody know of any other direct comparisons between these?
Apart from that, I actually found the comparison fair and accurate.
but mongo often downplays it's lack of durability, which makes me wary of using it or recommending it because people don't know how to use it.
Not saying that MongoDB wouldn't be faster with full commits turn on, it is just that their design decision to pick that as the default and calling their product a 'database' seemed very strange at best, and dishonest at worst.
The only benchmarks we have ever done have been for internal testing comparisons between different versions.
The "Benchmarks" page on our site clarifies this policy: http://www.mongodb.org/display/DOCS/Benchmarks
Previously there were several third party benchmarks on this page, which we recently took down to stand firmer on our benchmark policy. In the interest of full disclosure however, you may examine the page history to verify that we have always clarified these as unaffiliated third party sourced.
Well actually it depends on what type of logging. If you plan on pouring megabytes of data/sec second into it continuously you might want to find something else. I don't think CouchDB would be a good candidate for that. It might be if you plan on archiving your post-processed logged data for a long term storage but you have to be smart about its format.
Yeah 'logging' can mean a lot of things that it is hard to give a better advice without more information.
Other DBs/tools you might want to look at:
* rrdtool http://oss.oetiker.ch/rrdtool/
* MongoDB http://www.mongodb.org/
* Redis http://redis.io/
* Custom format + plain text files
RRDTool is nice, but only for data where you don't mind losing records.
For straight logging, SQL is actually a better solution than a lot of those options. If you need weird queries, something like Elastic Search or Solr on top of your SQL DB can buy you quite a bit of freedom. As can denormalizing your SQL.
One other thing to consider of course, is something like syslog.
I love CouchDB but i definitely wouldn't use it for logging.
However, a document update in CouchDB is fully ACID (including the A of Atomicity). People often confuse transactions around multiple changes with ACID for reasons that I cannot fathom. CouchDB does not have support the former (they don't scale well in clusters) but absolutely supports the latter.
I could see having a CouchDB cluster per co-location, recording a document per logging event. Then back haul through replication to a central service for analysis/dashboard use.
The only tricky part I see is to delete old logging data requires a compaction period and according to http://wiki.apache.org/couchdb/Compaction it's entirely possible for the compaction process to be slower then write data and never actually finish.
Edit: Also the back end server doing analysis may need to be a BigCouch cluster to handle the load (depending on size) https://github.com/cloudant/bigcouch
MongoDB is lightning fast at writing (provided you haven't got indexes, or your indexes fit in RAM), good at ad-hoc stuff, and a little more durable than /dev/null. Just remember to back up occasionally.