Live data from Hacker News

I got pwned by my cloud costs

troyhunt.com

261–270 of 657 posts

Re: I got pwned by my cloud costs

#261
post #187

Earlier quoted context omitted.

Yeah - if you look at Troy's graphs they're already calculating an average bandwidth and the alert he's configured has a threshold ~1/50th his current level. Trying to set a hard number limit ahead of time is hard (estimating how much you'll use, don't want to set a number too low and get cut off plus cloud cost structures can be really hard to get your head around) but that basic level of anomaly detection should be…

> estimating how much you'll use, don't want to set a number too low and get cut off plus cloud cost structures can be really hard to get your head around Easy way of avoiding this: Don't use shitty hosts that make you pay per GB served and shut you down once you hit your cost limit. Instead get limited by the available bandwidth you have, and clients will just access your server slower rather than being fully denied…

Who does that, though? I'm including things like 95th percentile in "pay per GB served", but you're painting a pretty broad brush if you class a host as shitty if they won't give you a switch port and not care whether you're sending 2 packets per fortnight or maxing it out.

Re: I got pwned by my cloud costs

#262
post #94
post #56

Can somebody explain to me why I wouldn't just rent a 40 EUR dedicated server from Hetzner with unlimited traffic and gigabit uplink? His 600GB/day is way less than what you get over a gigabit link within a day. Sure, sudden bursts would perhaps "throttle" at a gigabit, but according to his article that was only the cloudflare proxy anyhow, so no pain in having that take a few seconds longer. As far as I am concerned…

I think it is an irresponsible fad that people use cloud services for hobby projects (and despite its wide popularity I'm calling HIBP a hobby project since he's running it on the side for free) unless they have solid cloud ops experience from their day job. Cloud providers love it when people do this and are famously easy to talk to when you get an unexpected invoice high enough to require remortgaging your house to…

My cloud costs for my micro instance are about $12 a month. Multiple domains on there. I don't use RDS, ElasticCache, not even load balancers. If you want to keep the costs reasonable, you must roll that stuff on your own, which is totally possible (and free), and in fact kind of fun as a learning experience.

Re: I got pwned by my cloud costs

#263

Earlier quoted context omitted.

The direction is opposite IMO. As you grow bigger on prem starts making a lot more sense.

No thanks. In our case we would then need to hire DBA etc. I prefer to have as many managed (in this case by AWS) services as possible.

Once you scale you'll need DBAs anyway to do things AWS won't do for you,or developers with the same skills, like figuring out why your developers are writing queries that kills the production database because they didn't test with data sufficiently similar etc.. I used to manage about 100 Postgres instances alongside ca ~1000 VMs total spread across colocated servers and managed hosting in several countries. The time I spent spent on the type of DBA tasks that e.g. AWS RDS automates away from you was measured in minutes per month after I'd spent a few days automating backups and log shipping and failover.

I kept being asked to price out a migration to AWS, and we kept coming up with 2x-3x the cost. Part of the reason was that we could pick and choose servers that fit our workload in a way we couldn't with AWS, and partly the absolutely insane bandwidth prices AWS offered.

I use AWS. I like AWS for the convenience. But it's a luxury that is ok when you're either small or really high margin, and you're paying massively over the odds for that luxury.

The reason these services get away with being so expensive is that people massively overestimate the complexity and don't bother actually getting quotes from people or companies to manage these services for them. When I was doing consulting my biggest challenge in offering up alternatives to AWS was that people were so convinced AWS was cheap that even when presenting them with hard data they often didn't believe it. For me it was a mixed bag - I tended to make more money off the clients who stayed on AWS as they usually needed more help to keep an AWS setup running than those I migrated to managed hosting setups, despite paying more for the hosting too.

Re: I got pwned by my cloud costs

#264
post #56

Can somebody explain to me why I wouldn't just rent a 40 EUR dedicated server from Hetzner with unlimited traffic and gigabit uplink? His 600GB/day is way less than what you get over a gigabit link within a day. Sure, sudden bursts would perhaps "throttle" at a gigabit, but according to his article that was only the cloudflare proxy anyhow, so no pain in having that take a few seconds longer. As far as I am concerned…

It depends somewhat on the organizational skillset you have, in my opinion.

Current workplace is considering a fully self-hosted stack as a unique selling point for the customers and segments we're in. That means, we have storage and linux admins available, as well as tooling and know-how how to run this securely and efficiently. Thus, placing large and often downloaded files on our file stores at hetzner is very much a no-brainer, because it adds very little workload to the teams maintaining these stores and it's cheap.

However, this can be a daunting thing if you don't have this skillset in the org. It can be learned, but that's time spent not working on the product (and it's not trivial to learn good administrative practices from the hell that google results can be). At such a point, a cloud service just costs you less man-hours. And again - it wouldn't be much time for me, but it would be a lot of time if you had to figure all of that out on the fly. That's essentially why the saying goes that cloud services save you time, but cost money.

Re: I got pwned by my cloud costs

#265
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…

Or simply use a proper CDN that doesn't pretend to eat all the cost for a flat fee but then sometimes does not. BunnyCDN has an amazing volume tier at half a cent per GB.

Oh exactly that.

Or if caching is your biggest priority then Fastly or Akamai will shine too.

But if you're balancing all considerations and want the cheap "good enough" caching with the DDoS protection, free TLS certs, and unmetered (assuming you aren't imgur or something)... then Cloudflare does a great job at being good enough. And for those sharp edges... drop in a proxy of your own, or layer your CDNs.

Re: I got pwned by my cloud costs

#266

Earlier quoted context omitted.

It's not that good. I'm constantly getting "Access Blocked" to various websites by Cloudflare trying to protect them....from me reading them.

Same here. I live in Turkey and Cloudflare just block many websites' access from here. I can't access some sites just because I'm from an IP range from Turkey. I can jump onto my VPN, but still, not convenient.

Some websites configure their own rules in CF to block traffic from certain countries.

Re: I got pwned by my cloud costs

#267

Ah the old cloud provider switcheroo. Yip this is the way they make money. They make it easy to setup some gigantic hugely scalable website then hit you with a gigantic scaled up bill. AWS would do this as well. Team I'm in at the moment is in the early stages of cloud adoption but the company in total has fell hook line and sinker for AWS. When I mentioned the cost there is always an excuse. The main one being that…

our department now spend > £1 million per year to AWS in hosting costs. A 20% reduction in those fees could pay for a few sysadmin(s).

You can hire a "few" sysadmins for 200k/year?

Re: I got pwned by my cloud costs

#268
post #122

Earlier quoted context omitted.

Most cloud users will have a VM somewhere which you also have to manage.

Not at all. GCP, AWS, and Digital Ocean all have PaaS/serverless systems that eliminate the concept of VM (from your perspective). I haven't managed a production VM in many years.

Even Elastic Beanstalk, which is just EC2 instances have a checkbox for automatic 0 down time updates.

Re: I got pwned by my cloud costs

#269
post #133

Ah the old cloud provider switcheroo. Yip this is the way they make money. They make it easy to setup some gigantic hugely scalable website then hit you with a gigantic scaled up bill. AWS would do this as well. Team I'm in at the moment is in the early stages of cloud adoption but the company in total has fell hook line and sinker for AWS. When I mentioned the cost there is always an excuse. The main one being that…

That stackoverflow infra blog post is out of date. They use more than a single webserver now. For example: https://stackexchange.com/performance

Now they have 9.

They still serve a lot more traffic than I do and I have hundreds of instances; thousands of containers.

Re: I got pwned by my cloud costs

#270

One wonders how Cloudflare can essentially absorb all bandwidth costs. But AWS and Azure are using them as a profit center.

On the cloud providers, you are paying for your usage (yes, marked up, but they have costs too).

Cloudflare has the same model, but they distribute the costs. The vast majority of people never use anywhere close to their share, so they subsidize the outliers and the free tier.

Post reply on HN