Live data from Hacker News

Does everyone hate MongoDB?

blog.serverdensity.com

101–110 of 159 posts

Re: Does everyone hate MongoDB?

#101
post #39

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…

With 400GB of data I'd imagine you are going to be ripping your hair out at some point or another regardless of what database you use ... there is no way to completely avoid tech issues over the lifetime of a product/service.

At least with a serious RDBMS you'll have loads of awesome tools and solid experts around to help you solve your scaling problems.

Re: Does everyone hate MongoDB?

#102
post #96

Earlier quoted context omitted.

Maybe you should learn something from your failure.

Maybe you should make constructive comments instead of making assumptions about what people learn or don't (or what they know or don't, or what has worked for them or hasn't). There are some really disrespectful people in this community.

I didn't say you didn't learn anything. But you seem to be making excuses for why you shouldn't know some very basic things about MongoDB. It uses a memory-mapped file. How can that be larger than 2GB in 32-bit system?

It has async writes...this is pretty well documented by 10gen and is also something noted by a lot of tutorials, blog articles etc. You should have known something this basic about a database so important to your business.

None of that would bother me in the slightest if you were not still here defending such basic mistakes and blaming them on 10gen.

Re: Does everyone hate MongoDB?

#103

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 simplicity. I can fix something that is broken.

Re: Does everyone hate MongoDB?

#104
post #100

Earlier quoted context omitted.

Maybe you should learn something from your failure.

You have been a "technology manager" at Bank of America in North Carolina since 1998. Do you try new technologies such as MongoDB professionally? What are your qualifications to make such a vague statement? More importantly, what is the lesson to be learned?

I made them in other replies, sorry for being so opaque.

The fact that a 32-bit memory-mapped file is limited to 2GB is basic comp-sci. It is also reported by MongoDB everytime it starts. Furthermore it is noted in the 10gen docs in several places.

Async writes...also extremely well documented.

So the failure here is two things: failure to properly research and understand a technology critical to their business. And then failure to take personal responsibility for the first failure, and instead to blame the vendor for not building a tradition DBMS despite the documentation about the stark differences.

I use MongoDB in a side-project if that is important to understand.

Re: Does everyone hate MongoDB?

#105

Earlier quoted context omitted.

Yes that is true for me, at least using the 10g binaries for Linux (not the Ubuntu package). You get this warning everytime you start the engine. You'd probably have to look at your logs to see it. It is also referenced in the installation documentation. Look guys, MongoDB uses a memory-mapped file. How can it be larger than 2GB on a 32-bit system? There should not need to be "warnings everywhere".

I think expecting end-users to know or care about the implementation detail of a memory-mapped file is even sillier than all the other silly expectations floating around this thread.

You are right I would not expect end-users to know this. I would expect someone who writes articles about DBMS to know this though.

Re: Does everyone hate MongoDB?

#106
post #83

Earlier quoted context omitted.

How do you know that you're going to rely on it if it's new? I install something new. I kick the tires. It takes a long time until I decide I'm going to rely on it. I'll look at the log at some point, but not necessarily the first time I install something. There are better things to do at that point.

Maybe you should learn something from your failure.

So important to my business? What business are you talking about? You are just confused.

All this time I've been talking about a toy app that I wrote to kick MongoDB's tires. If you don't understand that, there is no point in having a conversation.

I never had or have any plans to use MongoDB for any business.

Re: Does everyone hate MongoDB?

#107
MongoDB is really easy to get started with. It's easy to install on a VM, and it's easy to try it out on Heroku. There's drivers for a bunch of languages, and its API works in a way that fits well with the way programmers already think. It dispenses with pretty much everything that makes getting started with a new database hard (schemas, new syntax, unfamiliar concepts, needing to edit server configs).

MongoDB "just works" out of the box for testing and development. It's practically the perfect database for any testing and development work. And their marketing documentation tells you that it'll just work in production and will scale really well. That makes a lot of people try MongoDB, and they're mostly very happy with it.

...the problems arise later. Because while MongoDB lives up to the hype for testing and development, it doesn't completely live up to the hype for production uses. It doesn't always scale that well. It isn't always as durable as you might hope. Performance isn't always very good. For some use cases, the default settings aren't appropriate; for other use cases the database design itself isn't appropriate. Backups and replication aren't quite as easy as you'd hope.

In short, the problem comes because MongoDB is as good or better than, say, Postgres or Riak during development in basically every way, but it's only better than Postgres or Riak in a few specialized ways during production.

Example: Riak basically won't work at all in a multi-tenant setup. Two competing services will provide you with a free development MongoDB instance on Heroku, but nothing of the kind exists for Riak; you basically need to roll your own cluster. That makes MongoDB really easy for someone thinking "hey, I wonder if Mongo would work for this proof of concept I'm working on" (hint: it will). Of course, MongoDB replication and scaling is honestly mediocre, while Riak's is basically magic. This makes Riak a better choice for someone who needs to scale a cluster of database servers - but you only find out that sort of thing first-hand during production. At which point, you make an angry blog post that hits Hacker News. And while plenty of people never run into MongoDBs weak areas, they never post anything that hits the Hacker News frontpage. :)

TL;DR: A lot of people hate MongoDB because it's amazingly easy to get started with, but harder later on, and they then feel betrayed. Other databases have smoother learning curves.

Re: Does everyone hate MongoDB?

#108
post #24

You mean the mug, the tshirt or the database? The mug, and tshirt have been quite good. Haven't tried the db.

You raise a valid point. If this essay by pg holds true, you might be better off sticking to PostgreSQL (the other pg): http://paulgraham.com/javacover.html

Re: Does everyone hate MongoDB?

#109
post #106

Earlier quoted context omitted.

Maybe you should learn something from your failure.

So important to my business? What business are you talking about? You are just confused. All this time I've been talking about a toy app that I wrote to kick MongoDB's tires. If you don't understand that, there is no point in having a conversation. I never had or have any plans to use MongoDB for any business.

Sorry, you are right I conflated your article with another one referenced in the submitted post. I feel at least as stupid as I am, I can assure you.

Re: Does everyone hate MongoDB?

#110
post #71

Earlier quoted context omitted.

The issue is not the limit; it's the silent failure. 32-bit Oracle doesn't do that, it tells you it can't extend the tablespace by raising an exception.

I'm not trying to defend Mongo, but the reason it doesn't tell you is because you didn't ask for it. If you care about the data (i.e. it's not a log or something that's not very important), you ought to always use "getLastError" to see if your data was actually stored or not (some drivers, like mongoose (for Node.js), just let you specify a simple flag ("safe:true") that does this automatically). A shitty default, no…

Shitty defaults are 90% as bad as hardcoded unfixable settings.

Defaults usually don't get changed, convention over configuration, etc.

Post reply on HN