News for hackers. Stuff that matters.
Re:MongoDB, Data Durability and Improvements coming in 1.8 by noelwelsh on Monday January 10, 2011 @04:16PM (#2089780)
I'm pleased Mongo is getting single server durability. I have never understood why it got so popular without this feature. I'd love to know why people choose Mongo over say, Riak, or CouchDB, as the majority of projects don't need more than one server.
Re:MongoDB, Data Durability and Improvements coming in 1.8 by ericflo on Monday January 10, 2011 @04:53PM (#2089885)
Because they market infinite scalability, insane speeds, and they have a nice API. But people don't realize that, while the speed is fast, you're driving without a seatbelt, and the scalability story is more or less false. They do have a nice API though.
Re:MongoDB, Data Durability and Improvements coming in 1.8 by prosa on Tuesday January 11, 2011 @03:07PM (#2093228)
Can you point us toward data that backs up your point that "the scalability story is more or less false"? Seems like FUD.

There are several well-documented, major production deployments of MongoDB already, that seem to contradict your assertion:

    * Etsy
    * CERN
    * BoxedIce (600MM+ documents)
    * BuzzFeed (400MM+ datapoints/month)
That's just a few from http://www.mongodb.org/display/DOCS/Production+Deployments
Re:MongoDB, Data Durability and Improvements coming in 1.8 by cdavid on Monday January 10, 2011 @06:07PM (#2090081)
I use mongodb to record fine grained log for performance tests, where it works like a charm. It is fragile (in that I have lost full databases when VM were full, for example)

I don't know about riak, but we are forced to use couchdb at work, for the wrong reasons I think, and I was not impressed. First, its performances are pretty bad: document insertion is slow unless you batch them, but even though it is slower than in mysql, even though the guarantees about durability are certainly not the same (couchdb was not configured to fsync at each write). Building views is excruciatingly slow, and the view engine does not use all the CPU available (even when IO wait is low, so not a simple IO issue). There are bug reports about this issue (cannot find it at the moment). Replication is not very reliable either for large data (where large against means a few GB, so actually not that large).

I am sure we are using couchdb the wrong way at work (out of my hands), and for the wrong application, but its design choices as well as my limited experience does seem to imply couchdb is not adapted for large amount of data, especially one which are written often (there was an interview last summer with D. Katz who said that there were not yet much optimization for large data).

Re:MongoDB, Data Durability and Improvements coming in 1.8 by cdavid on Monday January 10, 2011 @09:33PM (#2090616)
I cannot seem to edit my post, so here is the issue I am referring to w.r.t. couchdb and unused CPU: http://www.mail-archive.com/[email protected]/msg06520....

here is the interview of Damian Katz concerning couchdb: http://howsoftwareisbuilt.com/2010/06/18/interview-with-dami..., which mentions that large data is not a focus.

There are some companies which seem to use couchdb for large usage, for example bbc (http://enda.squarespace.com/tech/2010/3/4/couchdb-at-scale-4...). I don't know their infrastructure, but they claim to server 4 billions requests as of 4th march 2010 since summer 2009 on a 32 nodes (16 master, 16 backups). Assuming that summer starts in september to get an upper bound of the traffic, this means 250 rq/sec on average, which is nothing impressive for an infrastructure with 32 machines without more information about what they do. Generally, I would not say much about this kind of usecases, but since it is often advertised by couchdb proponents, the burden of the proof is theirs.

Re:MongoDB, Data Durability and Improvements coming in 1.8 by jchrisa on Tuesday January 11, 2011 @01:52AM (#2091188)
I agree we need to improve the interactive query capability of CouchDB.

As far as performance, the key with Couch is to keep the view generation speed faster than the insert rate. So if your users are generating less than about 1000 changes a second, you should be fine on a single server.

More than that and you may need to shard / partition, which can be done in a few different way. The leading option is BigCouch: https://github.com/cloudant/bigcouch

Re:MongoDB, Data Durability and Improvements coming in 1.8 by cdavid on Tuesday January 11, 2011 @04:08AM (#2091419)
Actually, the numbers I get are much lower than that (almost two orders of magnitude), but I suspect it is at least partly due to bad usage of couchdb.

I am actually working on simple benchmarks representative of what we do to see if there is something worth submitting as bug issues.

Re:MongoDB, Data Durability and Improvements coming in 1.8 by thenduks on Monday January 10, 2011 @06:36PM (#2090150)
You just have to tilt your head a bit and realize that you do need more than one server. For example - I don't know about you but I don't want to take down the site to deploy everytime I have to update some code (esp in the early days, this happens practically once a day).

With MongoDB you simply add a cheap second box and use it as at least a replica of your database. When you get tired of "we're updating the site with shiny new code" interrupting your users, you simply make it into a web-node as well.

Re:MongoDB, Data Durability and Improvements coming in 1.8 by va_coder on Monday January 10, 2011 @09:40PM (#2090637)
"I'd love to know why people choose Mongo over say, Riak, or CouchDB"

Here are some reasons:

* excellent documentation

* runs right out of the box

* excellent libraries like Mongoid

* user can easily perform deep queries (e.g person.address.zip = '90901')

* services are available like MongoHQ

Re:MongoDB, Data Durability and Improvements coming in 1.8 by weixiyen on Monday January 10, 2011 @05:09PM (#2089948)
For those projects I just ran backups of the file system. Linode does it for $5/month.

If your data was worth anything you'd also be using replication in which case the single server durability point becomes moot.

Re:MongoDB, Data Durability and Improvements coming in 1.8 by harryh on Monday January 10, 2011 @05:57PM (#2090055)
Because single server durability is a myth when hardware can fail at any time.
Re:MongoDB, Data Durability and Improvements coming in 1.8 by aneth on Monday January 10, 2011 @06:07PM (#2090085)
A city could be destroyed by a nuclear bomb at any time - that doesn't mean components of a system shouldn't be reasonably durable. Often it's impractical or unnecessary to have multiple servers for a proof-of-concept, a staging/test server, etc., yet it would be nice to not have to start from scratch, or to deal with backups, just because the database is so fragile. Basically, having a non-durable system forces you to take unnecessary precautions on non-critical systems because of the higher likelihood of failure and lost time investment.
Re:MongoDB, Data Durability and Improvements coming in 1.8 by lwat on Monday January 10, 2011 @06:04PM (#2090075)
We're talking about data durability. When my SQL server crashes due to hardware failure I know that when I eventually get it back up and running the data will be consistent with at worst the last couple of transactions being rolled back.
Re:MongoDB, Data Durability and Improvements coming in 1.8 by harryh on Monday January 10, 2011 @07:39PM (#2090336)
This is most certainly not true. Disks fail in ways where the whole volume becomes unreadable all the time.
Re:MongoDB, Data Durability and Improvements coming in 1.8 by lwat on Monday January 10, 2011 @07:52PM (#2090379)
What I'm saying is that I can go up to my SQL server and disconnect the power cord and my database will not be corrupt when I start it back up. Sure if your HDD gets taken out by a meteor then nothing will save you but that's why you have backups.
Re:MongoDB, Data Durability and Improvements coming in 1.8 by bsg75 on Monday January 10, 2011 @08:13PM (#2090439)
Not guaranteed. I have had more than one customer experience hardware failure, resulting in a corrupt or suspect SQL Server database, that was unrecoverable via normal means.

In each of the cases where the customer had a true standby system, implemented via replication, log shipping, or mirroring, they were able to failover with little (log shipping) or no data loss.

In the cases where they had a single, standalone server, the option was to restore the last known good backup, or sent the database files had to Microsoft for analysis and repair.

ANY system (RDBMS, NoSQL, or otherwise), should have a standby replica to prevent data loss. If you data is stored on a single machine, you are doing it wrong.

Re:MongoDB, Data Durability and Improvements coming in 1.8 by lwat on Monday January 10, 2011 @08:27PM (#2090477)
I'm not disagreeing with you, all I'm saying is that SQL Server databases are built from the ground up to resist data corruption and does exceedingly well at it. Not so with NoSQL data stores.
Re:MongoDB, Data Durability and Improvements coming in 1.8 by ericflo on Monday January 10, 2011 @09:17PM (#2090580)
Not so with MongoDB. Let's please not blame all of NoSQL for MongoDB's bad design decisions.
Re:MongoDB, Data Durability and Improvements coming in 1.8 by aphyr on Tuesday January 11, 2011 @12:42AM (#2091050)
Yeah. There are several nosql backends which offer resistance to corruption under sudden failure. Bitcask, for example, is structured for on-disk data durability using some of the ideas for log-structured filesystems.
Re:MongoDB, Data Durability and Improvements coming in 1.8 by stilkov on Monday January 10, 2011 @04:35PM (#2089834)
Would that be that majority that doesn't really care about uptime?
Re:MongoDB, Data Durability and Improvements coming in 1.8 by yummyfajitas on Monday January 10, 2011 @05:09PM (#2089949)
Because MongoDB is webscale.

http://www.xtranormal.com/watch/6995033/