TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

5 点作者 sdfgkjshdfg大约 13 年前
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?

5 条评论

sdfgkjshdfg大约 13 年前
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<p><a href="http://www.colinhowe.co.uk/2011/02/23/mongodb-performance-for-data-bigger-than-memor/" rel="nofollow">http://www.colinhowe.co.uk/2011/02/23/mongodb-performance-fo...</a><p>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.<p>To hear it's only the index is a relief, but that hasn't been clear to me :\<p>So I assume creating an index is all that is needed for MonogoDB to prioritise it into memory?
benologist大约 13 年前
The <i>indexes</i> 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.<p>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.<p>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大约 13 年前
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大约 13 年前
At a minimum, your indexes must fit into RAM. If they do not, you are in for pain.<p>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大约 13 年前
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.<p>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.<p>Anyway I typically get around 200ms per request.<p>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.