Live data from Hacker News

I got pwned by my cloud costs

troyhunt.com

551–560 of 657 posts

Re: I got pwned by my cloud costs

#551
post #107

Don't put Cloudflare in front of a Cloud egress bill. i.e. don't do this: Azure|Amazon > Cloudflare Always use your own proxy where the egress is well within your free tier, i.e. do this: Azure|Amazon > Hetzner|Linode > Cloudflare Why? Because Cloudflare cache is a massively multi-tenant LRU cache and whilst hot files will be cached well (and with Cloudflare Tiered Cache even better - but this itself is a cost) anyth…

How about Amazon Lightsail? It price structure is basically the same with Hetzner or Linode, and you get it in-house if you use AWS.

Re: I got pwned by my cloud costs

#552
post #107

Don't put Cloudflare in front of a Cloud egress bill. i.e. don't do this: Azure|Amazon > Cloudflare Always use your own proxy where the egress is well within your free tier, i.e. do this: Azure|Amazon > Hetzner|Linode > Cloudflare Why? Because Cloudflare cache is a massively multi-tenant LRU cache and whilst hot files will be cached well (and with Cloudflare Tiered Cache even better - but this itself is a cost) anyth…

How about Amazon Lightsail? It price structure is basically the same with Hetzner or Linode, and you get it in-house if you use AWS.

It is not compute cost it is b/w costs. That is pretty much same beyond free tier within AWS .

Re: I got pwned by my cloud costs

#553
>This was about AU$350 a day for a month. It really hurt, and it shouldn't have happened. I should have picked up on it earlier and had safeguards in place to ensure it didn't happen. It's on me.

Uh no - it's on cloudflare and azure. Why don't they have a global setting that says Max Charges Per Month: $X and it just shuts down when it hits that number? This is why I don't really like using big cloud services like this.

Re: I got pwned by my cloud costs

#554

Earlier quoted context omitted.

I can see both sides. If you're a startup that needs to be able to scale quickly if product market fit is achieved, the cloud really saves your bacon. Or is your ten person team really going to figure out how to get Postgres to reliably run with billions of records, with encrypted backups, etc? It's basically a form of permanent debt. Faster product market fit, higher long term infrastructure costs until you have eno…

I don't disagree; but I think the cloud (AWS/Azure/GCP) have sort of shielded people from how cheap/powerful the underlying hardware has became. For ~100eur/month on hertzner you can get a 16core Zen3, 128GB RAM with 8TB of NVMe SSD. Unless your stack is horrendously badly optimised you can serve SO MUCH traffic off that - definitely billions of postgres records without breaking a sweat. So the scale argument somewha…

> I don't disagree; but I think the cloud (AWS/Azure/GCP) have sort of shielded people from how cheap/powerful the underlying hardware has became.

I guess I shouldn't be surprised, but I do find myself often surprised to realize that for a younger generation of developers they have never experienced hosting on bare metal. So they have not been exposed to costs & benefits vs. the cloud approach and feel that no local machine could ever be as fast as AWS. Even though in reality even a pedestrian server is immensely faster and cheaper than any AWS offering.

Now, sure, there are tradeoffs in ease of scaling up and other considerations, but it's good to keep and eye on the actualy tradeoffs you're making and how much it's costing.

Re: I got pwned by my cloud costs

#555
post #6

Ouch. If Troy Hunt of all people can make this mistake, it can happen to anybody. HIBP is an awesome service funded totally by donations, so it's too bad this happened. Of course Microsoft is happy to hide behind their confusing pricing model and let customers overpay for Azure without alerting them.

Every cloud makes this mistake easy! You have to manually activate billing alerts for everyone because they want you to spend more snd more each month. I am still waiting for a cloud without these dark patterns. But that will never happen because it‘s leaving a big amount of money on the table by not being hostile.

If I leave my water running then go on vacation I'll have a huge water bill too. I don't conclude my water company is intentionally trying to overcharge me. The more reasonable conclusion is: building an alert system that addresses every customer need is hard. Most enterprises (where all the customer focus is) want minimal downtime above other considerations, including cost.

Re: I got pwned by my cloud costs

#556

Have you contacted Azure? On one hand you owe the money “fair and square”, but on the other if I were them I’d waive an unexpected $10k bill to a good faith actor that was incurred without any proactive notification by Azure.

100% do this. Azure has a surprisingly responsive billing support team and will likely eat this as goodwill (honestly with this on the front page of HN they'll probably do it proactively). Just open a ticket in the portal.

Re: I got pwned by my cloud costs

#557
post #321

Earlier quoted context omitted.

> Azure|Amazon > Hetzner|Linode > Cloudflare Why not directly Hetzner|Linode > Cloudflare?

Because Hetzner and Linode VPSs have fixed disk sizes, while Azure and AWS have basically infinite storage. You use your cheap commodity VPS as a cache, not a source-of-truth.

Many of them have managed object storage services as well. OVH[1] and Linode[2], scaleway[3] have them, that should scale for most use cases and are S3 compatible APIs

Also Azure and Linode, Scaleway Backblaze and others are part of Cloudflare bandwidth alliance [4] so there shouldn't be egress fees between the two.

It is really only AWS which is a problem, you don't need this setup with any other provider.

[1] https://www.ovhcloud.com/en/public-cloud/object-storage/

[2] https://www.linode.com/products/object-storage/

[3] https://www.scaleway.com/en/object-storage/

[4] https://www.cloudflare.com/bandwidth-alliance/

Re: I got pwned by my cloud costs

#558
post #18

Interestingly, Troy says that egress is expensive on Azure at $0.014 AUD/gB (~$0.010 USD/gB), but that is the same price as additional egress for Linode and DO, and Linode egress has never struck me as expensive. In fact, I’m kind of shocked (as an AWS user) that Azure egress is the same price as Linode. Actually, wow it seems AWS is also the same price as Linode and DO for egress. While Linodes and DO do come with d…

I think the article is incorrect.

https://azure.microsoft.com/en-au/pricing/details/bandwidth/...

The AUD $0.014/GB is only for data transfer between Availability Zones.

Re: I got pwned by my cloud costs

#559

Earlier quoted context omitted.

> Or is your ten person team really going to figure out how to get Postgres to reliably run with billions of records, with encrypted backups, etc? Actually AWS won't help you here. I have literally been on a 2 day training course or aurora with AWS and the explanation of how to scale was actually just the same as any traditional non-cloud explanation. Correct usage of indexes, partitioning data, optimising queries (e…

There are two parts to this. You are correct that RDS doesn't help you with picking the index strategy, or optimizing queries. I don't see that as running the DB though, that is how you interact with it once its running. What it does do it help you reliably run the DB server itself. Without any effort you can stand up a redundant, high availability deployment. With all of the data encrypted at rest. And configure nig…

> Without any effort you can stand up a redundant, high availability deployment.

Yes, it is seductive. Sometimes worth it.

But realize you'll be paying monthly in perpetuity for the convenience of that one-time setup which could've been done a a few days, give or take.

> all of those features cost us less than 8 hours of my time each year

I'm surprised! Our RDS costs are about 10 engineering hours per month (120 eng/hrs per year). This is with hardly any customer traffic or data yet (early startup phase).

It's worth it for now, but it'll become unreasonably expensive later.

Post reply on HN