Live data from Hacker News

Does everyone hate MongoDB?

blog.serverdensity.com

51–60 of 159 posts

Re: Does everyone hate MongoDB?

#51

We've been using MongoDB in production for our main content store at Conversocial for over a year now. We've gone from 1.8 to 2.0 to 2.2 and we're happy. We have ~400gb of data, 220 million documents all on Amazon's SSD instances. We have definitely had our moments where we've screamed that we hate Mongo and are going to rip it out. That's normally where we've overlooked a detail of how it works... and we've had this…

At our company we have a much bigger MongoDB dataset in production. I can relate well to your comments, since it is the same stuff that I hear from our developers as they defend Mongo after yet another horrific situation. They have a tough time admitting that Mongo is the problem, and instead always find ways to say that it was their fault.

This is such a strange thing for me to observe, but I think that it has to do with the fact that MongoDB works so smoothly initially with a default install that it hooks you in, and then later when you have a large dataset and it stops working well, it's hard to understand how what was such an amazing technology can now fail so badly.

It's also a huge problem that once you run MongoDB at scale, you desperately need experts to fix things, but it's so hard to find any so-called experts who can help. 10gen did a great job of marketing to developers, but unfortunately they seemed to spit in the face of DBAs and Ops people a long time ago by proclaiming them to be unnecessary and archaic. Running any significant MongoDB database in production requires as much expertise as someone running a big MySQL instance, but there isn't a community of database lovers around MongoDB who you can hire.

The DBAs and operations people I know dislike or even hate MongoDB, often for valid reasons that 10gen should address such as the as-yet-unfixed 'write lock' issue, code instability and inaccurate/misleading documentation. 10gen has done a great job at evangelizing to developers and making features that developers love. Now that 10gen has so much money, I hope that they can now afford to start making MongoDB a database that Ops people and DBAs can love.

As a final note, this ServerDensity guy is clearly looking at the world through mongo-colored glasses. It makes sense I suppose since he is all-in with MongoDB for his company. But we were using his service up until three months ago, and had a lot of problems with intermittent performance issues that seemed to be database-related since the site was still working and only certain pages would take 30 seconds or so to load. It's possible that the problems were temporary and no longer exist, but it brings home my point. If MongoDB experts can't make their own services 100% reliable, what hope does a regular startup have of getting MongoDB to work well at scale.

A developer may feel comfortable making the decision to go with MongoDB, but if they are wrong it won't cost them their job and they won't need to pull their hair out dealing with Ops issues all the time. If a DBA or Ops guy is being hired to manage a company's datastores, I don't see MongoDB (even 2.2) being a contender. At this point there are simply other DBs available that can perform the same or nearly the same without all the fussiness. Developers may be unhappy since nothing yet is as easy to develop on, but they'll be happier in the end when stuff 'just works'.

Re: Does everyone hate MongoDB?

#52
No I like it if you know it's limits. Schema free supports agile development much better than e.g. MySQL. Compared to key/value stores it's easier if you need to query data (and don't have Twitter scale amounts of it)

Re: Does everyone hate MongoDB?

#53

While I haven't gone full production with MongoDB yet, it has been a struggle to hear the signal through the noise. I'm glad that there are proponents of MongoDB like ServerDensity, it's nice to hear the other side of things from people who understand the issues. Out of all the issues mentioned, I'm particularly interested in a fix for uncompressed field names.

That is very trivial to do in your ORM if you so choose - and something like the Li3 PHP framework (lithium) would handle this quite nicely. To be honest, I'd rather have on-the-fly compression of data fields. At the moment I need to do this on my end, but it would be nice to be able to mark fields as compressible. Ah well.

Agreed, lithium user here :-)

Re: Does everyone hate MongoDB?

#54
I wouldn't say I hate it, but I took MongoDB into production two years ago only to have it be a consistent source of problems for me. We integrated it to offload some activity from MySQL, it did a great job for a while, but it's a constant chore to maintain.

Re: Does everyone hate MongoDB?

#55
post #43

I think a lot of the "hating" is a side effect of MongoDB being consistently oversold in terms of its capabilities and architecture. Many people who are not experts on databases discover this the hard way later. If the claims about it were qualified a little better and the limitations acknowledged more openly by its proponents it would help to mitigate this outcome. I am indifferent to MongoDB but I do caution people…

I like the concept of MongoDB. My main problem (which perhaps is not totally clear from my post, linked in the article) is that there are certain historical conventions about what a database should be. In particular, a database will not have the following default behavior: - return from a write call silently, when the data wasn't written and will not be. If you are going to break conventions on a multi-decade traditi…

I haven't got a 32 bit version of Mongo, but people pointed out in the other thread that 32-bit version of mongod displays a little warning every time you start it saying it can handle only 2GB of data.

Can you confirm this (because I don't have the 32-bit version installed)? It still stinks, especially because it "silently failed after hitting the threshold", but I personally would feel better about 10gen if this little story is true (i.e. they warn you about it not only in downloads page, but every time you run mongod).

Re: Does everyone hate MongoDB?

#56
I really appreciated this post for its thoughtful quality. It provided a bunch of "in our experience" analysis of situations that others presented, noting both the mistakes of users and Mongo itself, without playing the blame game.

The presentation of mitigation strategies for both sources of issues was actually constructive for potential and current users of Mongo. As with any tool, Mongo is useful in some scenarios but not without its drawbacks. It's nice to have a point-by-point assessment of pain points.

Falling into the potential user category, I've opted not to use MongoDB for my current project because the particular benefits don't align nicely with my problem, but it was useful to see this and know a bit of what to expect with Mongo, good and bad.

Re: Does everyone hate MongoDB?

#57
This article isn't exactly inspring me to give MongoDB a shot. I wasn't even aware Map-Reduce in MongoDB was single-threaded, doesn't that defeat the entire purpose? Isn't Map-Reduce an embarrassingly parallel algorithm?

If they're using a single-thread JS engine, can't they just multiprocess? No shared state, after all...

Re: Does everyone hate MongoDB?

#58
"Getting your working set in memory is one of the most difficult things to calculate and plan for with MongoDB."

I am a little bothered when I see a working set described as though it was a property of the user or workload.

A large part of database research has gone into allowing the user or the system to make the working set smaller. An obvious example is an index, which makes the working set smaller if you don't mind a random I/O or two per lookup (of course, that only works for indexable queries).

There are also many operations in a database which try to work within a limited amount of memory, and therefore must have a small working set regardless of the data size. Sort and HashJoin are two examples. HashJoin doesn't tell you what the working set of your data is, you tell it and it works as efficiently as it can in that amount of memory.

And you can design your data layout to have a smaller working set (again, so long as you allow a few disk accesses outside the working set). Normalization and vertical partitioning (i.e. splitting a table up into several tables with fewer columns each) can help here.

So, the "working set" isn't some passive constant that can't be managed.

Re: Does everyone hate MongoDB?

#59
I am a huge fan of MongoDB and have been using it for years. That said, my default data store is PostgreSQL. I have to have a good reason for choosing to not use PostgreSQL.

I especially like MongoDB for data analytics: really handy for storing data and then doing experimental data mining. Putting a read replica on each server that does analytics/data mining works especially well (very good performance when MongoDB's indices fit in memory and the read mongo is on localhost to programs doing analytics).

Re: Does everyone hate MongoDB?

#60
YES!!!! We stopped using it in production and moved to Solr.

I don't hate MongoDB but I think it is overhyped. The fact that 10gen raised 42m is crazy. I would be surprised if those investors got any return greater than the money they invested.

Post reply on HN