TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

“MongoDB is dead. Long live Postgresql”

342 pointsby lestover 11 years ago

22 comments

functional_testover 11 years ago
Seriously, another case of using Mongo incorrectly? I want to believe all the Mongo hate, but I can&#x27;t because I always find out that the actual problem was one or more of:<p>* didn&#x27;t read the manual<p>* poor schema<p>* didn&#x27;t maintain the database (compactions, etc.)<p>In this case, they hit several:<p>&quot; Its volume on disk is growing 3-4 times faster than the real volume of data it store;&quot;<p>They should be doing compactions and are not. Using PostgreSQL does not avoid administration; it simply changes the administration to be done.<p>&quot;it eats up all the memory without the possibility to limit this&quot;<p>That&#x27;s the idea -- that memory isn&#x27;t actually used though; it&#x27;s just memory mapping the file. It will swap out for something else that needs the space unless you are actively using all the data, in which case you really are using all your memory. Which is why you should put it on its own server...<p>&quot;it begins to slow down the application because of frequent disk access&quot;<p>&quot;Finally we sleep quietly, and don’t fear that mongodb will drive out redis to swap once again.&quot;<p>You should be running Mongo on a server by itself. At the very least, if you&#x27;re having disk contention issues, don&#x27;t run it on the same server as your other database.<p>I&#x27;m not sure you always need to read the manual for everything, but for your production database, it&#x27;s probably worth it.
评论 #6802253 未加载
评论 #6802389 未加载
评论 #6802514 未加载
评论 #6802120 未加载
评论 #6804075 未加载
评论 #6802366 未加载
评论 #6803550 未加载
评论 #6802658 未加载
评论 #6802911 未加载
评论 #6802224 未加载
评论 #6811310 未加载
评论 #6802151 未加载
cullenkingover 11 years ago
Maybe I am just incredibly lucky, but mongodb has worked fine for ridewithgps.com - we are sitting at 670gb of data in mongo (actual DB size, indexes included) and haven&#x27;t had a problem. Replica sets have been fantastic, I wish there was another DB out there that did auto-failover as cleanly&#x2F;easily as mongo does. We&#x27;ve had a few server crashes of our primary, and aside from 1-2 seconds or so of errors as requests come in before the secondary is promoted, it&#x27;s transparent.<p>With that being said, we are using it to store our JSON geo track data, most everything else is in a mysql database. As a result we haven&#x27;t run into limitations around the storage&#x2F;query model that some other people might be experiencing.<p>Additionally, we have some serious DB servers so haven&#x27;t felt the pain of performance when exceeding working memory. 192gb of ram with 8 RAID10 512gb SSDs probably masks performance issues that other people are feeling.<p>Final note: I&#x27;ll probably be walking away from mongo, due to the natural evolution of our stack. We&#x27;ll store high fidelity track data as gzipped flat files of JSON, and a reduced track inside of postgis.<p>tl;dr - using mongo as a very simple key&#x2F;value store for data that isn&#x27;t updated frequently, which could easily be replaced by flat file storage, is painless. YMMV with other use cases.
评论 #6802779 未加载
评论 #6803927 未加载
评论 #6802641 未加载
评论 #6802967 未加载
评论 #6807000 未加载
评论 #6808202 未加载
pilifover 11 years ago
The title is a bit misleading. This is basically an announcement of a fork of Errbit that has Postgres support. Additionally, the fork was announced as an issue on errbit with no discussion or as an official pull request.<p>I would not consider this good etiquette. If you fork your project (especially without discussing the intention first), adding a bug to the original project isn&#x27;t a very nice thing to do.<p>An official pull request would be nicer or, even better, don&#x27;t bother the original project, but just announce your fork over other channels.<p>Even better would be to at least discuss the issue with the original project - maybe they agree and you can work together.
评论 #6804352 未加载
评论 #6802711 未加载
评论 #6802977 未加载
评论 #6803758 未加载
评论 #6807376 未加载
memracomover 11 years ago
Lets just say that PostgreSQL answers the criticisms of relational databases that led to NoSQL. The complaints all boiled down to saying that the RDBMS forced you to do things one way and that it was cumbersome. PostgreSQL evolved and fixed the most annoying issues like JSON support and schemaless key-value store support. That&#x27;s the way open source is supposed to work. Now folks are learning that throwing out the baby with the bathwater leads to more complexity than just learning how to use a relational database. The pendulum has swung back.
评论 #6802450 未加载
评论 #6802982 未加载
评论 #6802803 未加载
评论 #6803270 未加载
mmlover 11 years ago
The hstore enhancements coming in psql 9.4 will pretty much put mongo out to pasture.<p>&quot;Mongodb&quot; already nearly exists as a single column type, 9.4 will complete it.
评论 #6803240 未加载
pilifover 11 years ago
All the philosophical issues and &#x2F;(No)?SQL&#x2F; discussions aside, as a heavy user of Postgres and a user of Errbit, this is very good news to me. I have not much experience with running Mongo, but I have a ton of experience with running Postgres.<p>Even better: The application I&#x27;m using Errbit the most for is already running in front of a nicely replicated and immensely powerful postgres install.<p>Being able to put the Errbit data there is amazing.<p>This is some of the best news I&#x27;ve read today :-)
jvvlimmeover 11 years ago
If you want to use MongoDB in a project and you don&#x27;t intend to rely heavily on the aggregation framework, the consider TokuMX (<a href="http://www.tokutek.com/products/tokumx-for-mongodb/" rel="nofollow">http:&#x2F;&#x2F;www.tokutek.com&#x2F;products&#x2F;tokumx-for-mongodb&#x2F;</a>) as it alleviates many of the shortcomings of MongoDB (data compression, document level locking for writes, ...) + it adds transactions.<p>It&#x27;s a drop in replacement so it will work with current drivers. (if you have a running mongo cluster however expect quite some work if you want to migrate)<p>(I have no affiliation with TokuTek whatsoever except that I use their product)
评论 #6802759 未加载
endijsover 11 years ago
I&#x27;m no MongoDB expert, but recently started to look into this db. Can anyone tell me (from experience, not from promo materials) - for which use cases MongoDB is good fit and for which ones it&#x27;s not? It&#x27;s clear that it can&#x27;t fit for everyone. That&#x27;s why it would be good to know in advance, for what it most likely to find and for what it&#x27;s most likely not to fit.
评论 #6803150 未加载
评论 #6803608 未加载
评论 #6803369 未加载
评论 #6802896 未加载
kldavenportover 11 years ago
Their use case didn&#x27;t seem especially Mongo-centric, I wonder why they chose to go down the road. We used MongoDB TokuMX to improve performance: <a href="http://www.tokutek.com/resources/benchmark-results/tokumx-benchmark-hdd/" rel="nofollow">http:&#x2F;&#x2F;www.tokutek.com&#x2F;resources&#x2F;benchmark-results&#x2F;tokumx-be...</a>
egeozcanover 11 years ago
I&#x27;m nearly sure one day someone will write a MongoDB compatibility layer on top of PostgreSQL
评论 #6801868 未加载
评论 #6803898 未加载
评论 #6801881 未加载
评论 #6801891 未加载
评论 #6802573 未加载
评论 #6801989 未加载
评论 #6803238 未加载
评论 #6801873 未加载
评论 #6801903 未加载
weixiyenover 11 years ago
&gt; Finally we sleep quietly, and don’t fear that mongodb will drive out redis to swap once again.<p>Well duh, Mongo was designed to live on its own server as it tries to claim all of the free memory available. Putting it on the same server with Redis makes no sense.<p>The case that caused you sleepless nights does not apply to 99% of projects out there.
WoodenChairover 11 years ago
&quot;Nobody ever got fired for buying IBM.&quot; Nobody ever got fired for using PostgreSQL.
r0mualdover 11 years ago
In case you missed it, this submission is not about PostgreSQL vs MongoDB. It&#x27;s about the crazy GIF parade in the comments interleaved with thumbs up emojis. You don&#x27;t see such stuff often on github :)
trekky1700over 11 years ago
This just makes me wonder why they chose Mongo in the first place. It sounds like they didn&#x27;t really consider their needs when initially choosing databases. Mongo has some benefits that when properly implemented far outweigh the negatives. At the same time, it&#x27;s still relatively young, and doesn&#x27;t have the &quot;maturity of process&quot; that makes older SQL engines so easy to manage&#x2F;implement. Eventually, I&#x27;m sure, Mongo will solve these issues and be a great database for those who need to utilize its many virtues.
评论 #6802602 未加载
评论 #6802413 未加载
jeffdavisover 11 years ago
&quot;Its volume on disk is growing 3-4 times faster than the real volume of data it store[sic]&quot;<p>Are they saying that it has a high constant overhead to the data, or are they saying the storage grows in a super-linear fashion?
评论 #6802814 未加载
poseidover 11 years ago
Anyone compared MongoDB with other document stores, e.g. with <a href="https://github.com/triAGENS/ArangoDB" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;triAGENS&#x2F;ArangoDB</a> ?
iandover 11 years ago
Typo in title.
WalterSearover 11 years ago
Does anyone have a recommendation for an authoritative guide to either Postgres or Mongodb? One that does more than show you where the levers are, that is.
coolrhymesover 11 years ago
RDS now supports Postgres. It supports both hot &amp; cold swaps. Hopefully in future it will support read replicas.
filipedeschampsover 11 years ago
This is what I call a click bait title.
1945over 11 years ago
This title is why I&#x27;ve been reading Hacker News less and less.
mtolanover 11 years ago
Is PostgreSQL web scale? I will use it if it is web scale.
评论 #6803405 未加载