Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CouchDB or Mongo for very high update rates & volume?

What would be the best no-sql alternative for storing user data with very high update rates and volume of data?

e.g dumping tens to hundreds of lines of user state / navigation state data per page request for a high volume site.

I'm currently looking at Mongo or Couch but am open to other alternatives.

EDIT (in response to kprobst's request): It would be hosted on Linux and multiple instances (either HW or VM) can be made available.

The system would used to store a site visitors state, 1-2 weeks for unauthenticated users and (potentially) indefinitely for authenticated users.

I think the current way of thinking within the business is to use CouchDB as we use it elsewhere, but I also keep reading it's the most under-performant for constant updating and there is the potential in this system to be updating 30 - 400 lines of json into multiple documents, per user, as a user interacts with the site (usage is expected to be very high).

Besides this state "dump" other user information would be stored and being able to querying that would be useful.

like image 706
jdoig Avatar asked Mar 09 '11 04:03

jdoig


1 Answers

I recently investigated into a number of NoSQL technologies including CouchDB and MongoDB. The feeling I got was that MongoDB is more geared towards performance than CouchDB, possibly at the expense of certain features. e.g. MongoDB uses language specific drivers, CouchDB uses REST. MongoDB is "Update In Place" whereas CouchDB is MVCC. MongoDB stores data in memory-mapped files.

I chose MongoDB because it suited the type of data I want to store and the performance it offers. IMHO, I don't think an MVCC solution would be the best fit for the use you've described. As a document is updated, instead of overwriting the existing document, it creates a new version of it and then marks the old one as obsolete meaning those ones need to periodically be deleted/compacted. The more updates there are, the more work this will involve which would be my concern.

This is not to say MongoDB is the "better" choice over CouchDB, as they offer different things and what may be a disadvantage of one technology in a specific scenario, could well be an advantage in another scenario. You obviously have the advantage with CouchDB of already using it within the business so presumably less of a learning curve.

There's a bit more of a comparison of the 2 on MongoDB.org.

like image 70
AdaTheDev Avatar answered Sep 23 '22 02:09

AdaTheDev