Earlier quoted context omitted.
Read replicas are pretty easy on postgres using replication. That said, you need to be careful about replica lag. If you want to distribute your writes, that's a little trickier. There are options like Citus and such. But still not natively supported.
Second that. A client hat PG replica lag, was doing backups from the replica and found out during restoring a backup, that some hours of data were missing.
The Great Migration from MongoDB to PostgreSQL
321–330 of 339 posts
Re: The Great Migration from MongoDB to PostgreSQL
#322General speaking: don't use mongodb. It was super shitty when it came out and using postgres gives you a better and faster solution which you can also use in other projects. I'm always impressed when I see mongodb still making money.
Re: The Great Migration from MongoDB to PostgreSQL
#323Earlier quoted context omitted.
Because vertical scaling can take you so far these days that 99% of companies will never, ever reach the scale where they need more. There is just few incentives. Especially since: - Servers will keep getting better and cheaper with time. - Data is not only in postgres, you probably have redis, clickhouse and others, so the charge is balanced. In fact you may have different dedicated postgres, like one for GIS tasks.…
> vertical scaling can take you so far these days that 99% of companies will never, ever reach the scale where they need more its less about the scale and more about HA and service interruption: your service will be down if server dies.
Re: The Great Migration from MongoDB to PostgreSQL
#324Earlier quoted context omitted.
> vertical scaling can take you so far these days that 99% of companies will never, ever reach the scale where they need more its less about the scale and more about HA and service interruption: your service will be down if server dies.
Never heard of docker/k8s?
Re: The Great Migration from MongoDB to PostgreSQL
#325General speaking: don't use mongodb. It was super shitty when it came out and using postgres gives you a better and faster solution which you can also use in other projects. I'm always impressed when I see mongodb still making money.
While I'd agree with the general stance of avoiding MongoDB for any new project, I find the statement that postgres always gives better and faster solution dubious. They don't really solve the same problems. If you happen to really need horizontal scaling, actual HA (not failovers) or documents with many field-level atomic operations, MongoDB might still be a better fit than postgres. For on-premise hosting, not havi…
What type of ha can mongo do postgres can't?
Re: The Great Migration from MongoDB to PostgreSQL
#326I have done this migration twice and rethinkdb to PostgreSQL once. At this point I think document DBs are as good as dead for new projects. They will live for a really long time still but are in contraction and rent seeking mode now. Expect MongoDB licensing and hosting to increase in price and languish in terms of feature development from here on out.
Re: The Great Migration from MongoDB to PostgreSQL
#327Earlier quoted context omitted.
Second that. A client hat PG replica lag, was doing backups from the replica and found out during restoring a backup, that some hours of data were missing.
Ouch? Are there standard tools to monitor that? Any best practice to avoid? I am considering exactly tha kind of setup...
Re: The Great Migration from MongoDB to PostgreSQL
#328Earlier quoted context omitted.
MongoDB is great if what you need is a replicated log or queue. It's what Kafka should have been.
As others have said, you can just use your RDBMS for that now. Mongo is a feature of better products.
Mongodb is foolproof and works out of the box.
The other alternative here isn't Mongodb, it's Couchdb, but that isn't an RDBMS.
Re: The Great Migration from MongoDB to PostgreSQL
#329Earlier quoted context omitted.
I'm actually very bullish on MongoDB. While the article and significant sentiment in threads suggest a push off MongoDB toward PostgreSQL, I do think MongoDB has its own place in the stack and that it won't be obsoleted. I've personally had many pleasant experiences working with it in past projects. Regarding business metrics, I may have a slight bias coming from the startup world but we often value revenue the most,…
HN should be full of Mongo's users and advocates, and yet this site loathes it. That by itself is a sign that it's a zombie. The reason we don't just look at revenue is that you can "buy" revenue with ads and sales teams. But if that revenue growth costs more than it pays because your customers aren't sticky, then your business doesn't work. You can't apply startup principles to this large, aging public company.
Re: The Great Migration from MongoDB to PostgreSQL
#330I use MySQL for everything - always have. Can someone hit me with a few reasons why you would use Postgres over MySQL? I don’t have any familial affinity to any database, but I’m not sure what the benefits to Postgres are relative to MySQL.
Stability, reliability, consistency. If you do anything with Unicode you're also much better in PostgreSQL. Faster indexes, smaller base install ( ), and much more complete SQL language support. ( ) note: when PHP was taking off, MySQL had a smaller install base. This has long since changed - PostgreSQL hasn't grown much over the years, and MySQL has, at least since the last time I worked on both circa 2015-ish.