DEV Community

Discussion on: MongoDB Atlas & Azure - a forced marriage?

 
deyanp profile image
Deyan Petrov

@kyrylkov , you seem to know PostreSQL, I just took a look at the Azure hosting for PostreSQL, and stumbled upon some big limitations - e.g. are the connections really that limited (2 vcore instance on Azure allows only 100-145 user connections max??), and I need to use something like pgBouncer in between? Asking because one of my M20 instances has currently 625 open connections out of 3000 possible, and it does not even sweat ...

Thread Thread
 
deyanp profile image
Deyan Petrov • Edited

and one more - does PostreSQL have something like MongoDB Change Streams (which we use heavily)?

Thread Thread
 
kyrylkov profile image
Sergiy Kyrylkov
Thread Thread
 
kyrylkov profile image
Sergiy Kyrylkov • Edited

Regarding hosting options. Look at the difference in pricing between PostgreSQL and MongoDB scalegrid.io/pricing.html

  1. MongoDB is more expensive. This is due to MongoDB licensing, which puts any 3rd party provider into a disadvantaged posititon in comparison with MongoDB's own Atlas.
  2. You will end up with much larger data size in MongoDB in comparison with PostgresSQL). So in the end you may end up paying times more for MongoDB and still get slightly worse performance even for JSON storage.
  3. With MongoDB Atlas you're locked in to more expensive cloud providers (AWS, GCP, Azure). Because if you look at ScaleGrid, you'll see that DigitalOcean and Linode are significinatly more cost effective, but they are not available for Atlas.

So the question you have to answer is whether actual or perceived benefits you get with MongoDB are really worth it.

Thread Thread
 
deyanp profile image
Deyan Petrov • Edited

Don't believe the ScaleGrid website. Not only the pricing is off by 2x - e.g. I am paying for M20 cluster on Azure (2 cores, 4 Gb RAM) with 128Gb (500 IOPS provisioned, burstable up to 3500) around $250 (vs. $486 on the ScaleGrid website) but also the IOPS are incorrect ... And their competitor comparison page is completely outdated (from 2018) ...

Thread Thread
 
kyrylkov profile image
Sergiy Kyrylkov

The provide their services on top of multiple cloud providers, so of course, it's not what the cloud providers offer directly. But if you check directly cloud provider prices, they are correlated. For instance, heck for DigitalOcean charges for hosted MongoDB vs hosted PostgreSQL.

Thread Thread
 
kyrylkov profile image
Sergiy Kyrylkov • Edited

ScaleGrid provides their services on top of multiple cloud providers so you can easily migrate between them. Naturally ScaleGrid pricing is higher than what the cloud providers offer directly.

Check what DigitalOcean charges for hosted MongoDB vs hosted PostgreSQL. MongoDB is still more expensive and MongoDB data takes more space than PostgreSQL. There is no way around restrictive MongoDB licensing that stiffles competition. Before MongoDB changed their license there was mLab and many people used it. After the licensing change, mLab business went under and MongoDB acquihired it.

Thread Thread
 
deyanp profile image
Deyan Petrov • Edited

Sorry, was comparing my MongoDB Atlas charges vs what ScaleGrid would charge for PostreSQL on Azure.

If I compare PostreSQL vs MongoDB via ScaleGrid on Digital Ocean (for 3 node cluster in both cases, 2 cores, 4GB RAM) I see $140 vs $160, which does not sound like a big difference to me (also not a big difference compared with the $250 on MongoDB Atlas/Azure with more storage).

What I am not sure about PostreSQL though are these connection limits which I asked you about above, and how well it handles failovers from one node to another in case of VM failure, or simply maintenance etc.

Thread Thread
 
deyanp profile image
Deyan Petrov • Edited

of course, I am not aware of Digital Ocean's VM instance sizes, and whether their 2 core / 4 GB is fully dedicated/100% provisioned or burstable like in case of Azure ... if fully dedicated/not burstable then that would be a good cost advantage in favor of Digital Ocean, which is however anyway not a hosting provider I am looking at due to many other PaaS services we are after ..

Thread Thread
 
kyrylkov profile image
Sergiy Kyrylkov • Edited

Azure seems to suffer huge issues with disc performance (post from Nov 10, 2020) bunnyshell.com/blog/aws-google-clo...

DigitalOcean trumps all of the big 3, but Azure stands out in a bad way.

Atlas IOPS stats for Azure confirm this.