> Here's how we managed to cut our costs by 90% You could cut your MongoDB costs by 100% by not using it ;) > without sacrificing performance or reliability. You're using a single server in a single datacenter. MongoDB Atlas is deployed to VMs on 2-3 AZs. You don't have close to the same reliability. (I'm also curious why their M40 instance costs $1000, when the Pricing Calculator ( https://www.mongodb.com/pricing )…
We cut our Mongo DB costs by 90% by moving to Hetzner
181–190 of 214 posts
Re: We cut our Mongo DB costs by 90% by moving to Hetzner
#182OK guys, running on a single instance is REALLY a BAD IDEA for non-pet-projects. Really bad! Change it as fast as you can. I love Hetzner for what they offer but you will run into huge outages pretty soon. At least you need two different network zones on Hetzner and three servers. It's not hard to setup, but you need to do it.
My outage averages around 20 minutes per year, so an uptime of around 99.996%.
I have no idea where you see those "huge outages" coming from.
Re: We cut our Mongo DB costs by 90% by moving to Hetzner
#183Re: We cut our Mongo DB costs by 90% by moving to Hetzner
#184Atlas is plain robbery. I see companies paying 600K USD/month on a few clusters, mostly used for testing. The problem is they got locked into this, by doing a huge migration of their apps and switching to a different tech would easily take 2 to 5 years.
Re: We cut our Mongo DB costs by 90% by moving to Hetzner
#185Earlier quoted context omitted.
I think you're being overly dramatic. In practice I've seen complexity (which HA setups often introduce) causing downtimes far more often than a service being hosted only on a single instance.
Yes, any time someone says "I'm going to make a thing more reliable by adding more things to it" I either want to buy them a copy of Normal Accidents or hit them over the head with mine.
Re: We cut our Mongo DB costs by 90% by moving to Hetzner
#186MongoDB Atlas was around 500% more expensive than in-house every time I evaluated it (at almost every scale they offer as well). They also leaned too heavily on sharding as a universal solution to scaling as opposed to leveraging the minimal cost of terabytes of RAM. The p99 latency increase, risk of major re-sharding downtime, increased restore times, and increased operational complexity weren't worth it for ~1 TB d…
Re: We cut our Mongo DB costs by 90% by moving to Hetzner
#187Earlier quoted context omitted.
You'll have planned downtime just for upgrading MongoDB version or rebooting the instance. I don't think that this is sth you'd want to have. Running MongoDB in a replica set is really easy and much easier than running postgres or MySQL in an HA setup. No need for SREs. Just add 2 more Hetzner servers.
The sad part of that is that 3 Hetzner servers are still less than 20% of the price of equivalent AWS resources. This was already pretty bad when AWS started, but now it's reaching truly ridiculous proportions. from the "Serverborse": i7-7700 with 64GB ram and 500G disk. 37.5 euros/month This is ~8 vcpus + 64GB ram + 512G disk. 585 USD/month It gets a lot worse if you include any non-negligible internet traffic. How…
Re: We cut our Mongo DB costs by 90% by moving to Hetzner
#188Earlier quoted context omitted.
Personally I've found it faster to build using mongo cause you don't need to worry about schemas. You get 32mb per document and you can work out your downstream processing later, e.g. cleanup and serve to postgres, file, wherever. This data is a big data dump that's feeding ML models so relational stuff is not that important.
I used to build personal projects like this, but after Postgres got JSONB support I haven't found any reason to not just start with Postgres. There's usually a couple of tables/columns you want a proper schema for, and having it all in Postgres to begin with makes it much easier to migrate the schemaless JSONB blobs later on.
Re: We cut our Mongo DB costs by 90% by moving to Hetzner
#189Earlier quoted context omitted.
You can look at this particular bill and observe that more than 50% of the cost was going to AWS.
If they’re a reseller of AWS, which they will be, they decide the rates that get charged.
Re: We cut our Mongo DB costs by 90% by moving to Hetzner
#190Earlier quoted context omitted.
> many people just chuck something on us-east-1 and go Even dropping something on a single EC2 node in us-east-1 (or at Google Cloud) is going to be more reliable over time than a single dedicated machine elsewhere. This is because they run with a layer that will e.g. live migrate your running apps in case of hardware failures. The failure modes of dedicated are quite different than those of the modern hyperscaler cl…
It's not an apples-to-apples comparison, because EC2 and Google Cloud have ephemeral disk - persistent disk is an add-on, which is implemented with a complex and frequently changing distributed storage system On the other hand, a Hetzner machine I just rented came with Linux software RAID enabled (md devices in the kernel) --- I'm not aware of any comparisons, but I'd like to see see some It's not straightforward, an…
In a way, I think it doesn't matter what you use as long as you diversify enough (and have lots of backups), as everything can fail, and often the probability of failure doesn't even matter that much as any failure can be one too many.