The Verdict on MongoDB
rackspace.com
rackspace.com
I personally love most concepts behind Mongo. Schemaless, simple replication and sharing, JavaScript console, just to name a few. MongoDB is pretty much my dream database.
However, the ugly truth is that it doesn't work as advertised (this was 2-3 years ago). Replication would often crash or stall leaving us with only one option: DELETE OUR ENTIRE DATA SET and start fresh. Acknowledged by 10gen at the time. This happened 3 times.
Mongo was fast until we hit a wall. That was was at around 200GB for us, which is not that much when you put things in perspective. It was ridiculous. Running a given query took 1 ms and running it again right after could take up to 15 seconds. You'd think the second time would be faster.
The global write lock is just insane. This simply cannot work in a high traffic application. Our app was write heavy and this bit us in the ass quite a bit. We didn't feel this until much later, after we were fully invested in mongo.
Lastly, 10gen was literally the worst tech company I ever dealt with. They we're plain disrespectful to me, calling me cheap for not wanting to shell out 100k/year on a support contract. I was willing to pay them their hourly support rate (which is very high, but that's fine) to have them fix their replication bugs with our dataset.
For us, MongoDB was a terrible mistake that I'll never make again. I'm glad the truth has been coming out over the last couple of years.
I think they just added too many features too fast to get adopted widely. It appears now too they are less focused with improving the actual DB and more interested in getting in the enterprise services area. They market themselves as a general purpose DB but it is certainly not. I think many developers were turned on by the initial ease of use, and really did not consider if they should really be using a document store. We used it 100% due to the replication which does not work often.
Were you able to determine why this was? It does seem backwards, given the data should be cached at some layer.
Either way, was your experience the per-incident support was lacking because you did not have a support contract?
It becomes interesting, because for $100K per year, I could budget for a lot of choices.
We eventually just gave up on the whole thing.
Although I don't think I've hit 200gb (well, at least without blobs), I really like using couchdb as an object store. To get around limitations in CouchDB views, I usually just have ElasticSearch index the data in near 'real-time'.
I now think it actually makes a fair bit of sense to have storage and indexing happen in different applications, because it allows you to tune their performance and add/remove servers to the clusters separately.
Also, couchdb's replication _works_
We actually did something that's quite unpopular here but it was the right choice for us.
We started with Postgres and eventually ran in all sorts of performance problems after hitting a certain scale. We realized that nobody in the company knew anything about PG and that good consultants were extremely hard to find.
On the flip side, everybody had good to excellent knowledge of MySQL and we happen to have a friend who's one of the best MySQL guys in the world. Pretty handy.
We switched from PostgreSQL to MySQL and couldn't be happier. I think the lesson for us was: go with what you know and master, and with what's easy to fix, rather than what people on hackernews tell you to use.
> We switched from PostgreSQL to MySQL and couldn't be happier. I think the lesson for us was: go with what you know and master, and with what's easy to fix, rather than what people on hackernews tell you to use.
Thank you for this :)
MySQL 5.6 no longer has this limitation. Actually, pretty much everything we didn't like about MySQL has been fixed in 5.6. We kind of decided to give it another chance and we've been happy.
Kind of like a Chevrolet dealer writing an article offering a "verdict" on the Chevy Volt that consists of opinions of Chevy engineers and mechanics and ending the article with a link to their showroom selection. Not invalid but not objective and not really a verdict.
especially because the only reason I can see for everybody using mongodb is because it's popular.
Data matters the most. Your UI will be a tired POS in 3 years. Your backend data store won't scale for your new business problems. It'll be time to migrate, and then you'll start by asking yourself how clean and well-managed your data is.
All the problems you list you can have on SQL databases too It has to do with discipline to keep your data clean not with SQL or NoSQL
But why even bother with MongoDB? You could just use a text editor to make bunch of JSON text files, with one record per file.
Then, once you better-understand the data, and you haven't made many "schema" changes for a while, you can set up a SQL database and import everything.
There have been other 'surprises' in the past.
except MongoDB doesn't support transactions.
>Initially, the lock scope of MongoDB was database wide, but later versions have a scope per database.
that's just an editing error, it should say that initially the scope was instance wide, but now it's database wide.
Ask HN: When is MongoDB the Right Tool for the Job? https://news.ycombinator.com/item?id=7446919
edit added title of post.