

If MongoDB is only good when in-memory, then what use is MongoHQ? - sdfgkjshdfg

Just reading http://news.ycombinator.com/item?id=3837772<p>People are saying you need to fit the DB in memory for it to perform properly<p>Does this mean MongoHQ is something to be avoided for anything with load? Because according to their new website, 5gb of data would be serviced by 500mb of memory.<p>Don't get me wrong, for an agile startup this would probably awesome, and getting past 500mb of user data would be your bigger issue at first :) But long term, for a site/app that manages some level of success?
======
sdfgkjshdfg
Well if it is all about indexes, you'll forgive me for getting confused by the
term 'data set', that needs to be in memory

[http://www.colinhowe.co.uk/2011/02/23/mongodb-performance-
fo...](http://www.colinhowe.co.uk/2011/02/23/mongodb-performance-for-data-
bigger-than-memor/)

Mind you, I've also been to a Mongo seminar, where some real world website
managers talked about their data needing to be in memory.

To hear it's only the index is a relief, but that hasn't been clear to me :\

So I assume creating an index is all that is needed for MonogoDB to prioritise
it into memory?

------
benologist
The _indexes_ have to fit in memory, once they don't you're going to get
terrible performance. Also the indexes have to match your usage patterns, if
they don't you're going to get terrible performance.

The advantage of using MongoHQ is it lets you focus on the million other
things you need to be doing instead of learning and doing their job - we have
a bunch of stuff with them, if we hired someone and moved it all in-house we
would save negative thousands a month.

The disadvantage of course is you're typically sharing a shared server
somewhere on AWS and you may not be anywhere near them, and your indexes have
to line up properly. Long running + high volume queries can mess things up too
by saturating your connections plus degrading performance.

------
vyrotek
A legitimate question. As someone who has been exploring these hosted MongoDB
services I would also like to know if there are any drawbacks. (Besides the
latency of the calls themselves)

------
cheald
At a minimum, your indexes must fit into RAM. If they do not, you are in for
pain.

If you can get your data to fit into memory, that's an added bonus, but not
necessarily required for smooth operation, depending on your use cases.

------
taligent
I use MongoHQ and think they are really wonderful. Great customer service and
always helpful. Even if my startup grows to millions of users I would still
get them to manage my DB. Plus I like their admin/stats tools even if a bit
basic.

Because frankly the DB is the part of the stack that does the least to
differentiate me from the competition. So my efforts are frankly better spent
elsewhere.

Anyway I typically get around 200ms per request.

If you are a typical website though I would be trying to get that 500MB of
user data right at the front with Nginx/Lua/Redis.

