Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have strong knowledge and some good experience with MongoDB, and now, on my new job, we will use Riak (it's a new project that just starts) as primary server. And while user-friendliness of it is a bit horrifying sometimes (hope I can help to change that) in comparision to MongoDB, Riak's real beauty is it's architecture and main ideas.

And yes, these are just different databases. MongoDB is much more RDBMS-like (in terms of consistency, B-Tree indexes and queries), while Riak is what you think of when you think "auto-scalable". So now I love them both :-)



If you:

  1. evaluate the default settings with which MongoDB ships and
  2. evaluate MongoDB performance with more strict,
     consistent options and learn that it's quite slow and
  3. look at my comment above
... then you will quickly see that MongoDB is not RDBMS like at all in terms of data safety and consistency goals.

Currently 10gen is shooting for light-weight web workloads to spread the product, and they're very successful.


Well, yes, it would be fair to say that when you need to use MongoDB instead RDBMS you have to make safe=True commits all the time (otherwise you can really lost piece of them). I didn't do any benchmarks, because for usage like this I am completely ok with RDBMS, and use MongoDB in more "warehouse"-like use-cases (statistics, caching, long-running m/r on data etc.)

So MongoDB gets it's own niche: use it for "not 100% important data", but instead you get really high availibility of MongoDB cluster, really high speed and document-storage.

What you said about speed on safe commits is really interesting for me. I mean, of course they're slow consequentially, but in parallel they should be just as fast. Or am I wrong here?


MongoDB has very nice tunability. The new version ships with journaling turned on by default.

You can specify `safe`, which means the data will be written to the journal. You can also specify `fsync`, which means additionally the system will issue an fsync on the journal. Additionally, there's the question of the replication protocol, `W` in MongoDB. What I said is that if you turn on `W=2` it will be slow. You should also know that even with `safe` and `fsync` you may lose data if running in `W=1` mode if the master goes down in your replicata set. See my comment above and the reply from a MongoDB guy.


Yes, I understood what you said about W=2 and about safe. Maybe what I wrote wasn't too clear :-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: