Live data from Hacker News

I got pwned by my cloud costs

troyhunt.com

411–420 of 657 posts

Re: I got pwned by my cloud costs

#411
post #321
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…

> 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.

Re: I got pwned by my cloud costs

#412

Earlier quoted context omitted.

The cloud is great for scaling. The lead time for new servers deployed in a data center is weeks compared to seconds in the cloud. Plus there's no sunk cost in the cloud - you can turn it off when done and it evaporates. Also, the cloud offers managed software as a service. You don't have to manage your own HA DB cluster or PubSub. It's all just there and it works. That can save you a lot on technical labor costs. Bu…

The technical ability to scale is a bit meaningless if you can't afford it.

"If you can't afford it" is doing a lot of assuming and a lot of heavy lifting in that statement. Whether or not you can afford it depends strongly on your scaling bounds (how much you need to scale) and how you've chosen to implement it.

There are plenty of tools and systems that can present a sufficiently linear cost relationship to load and usage that, should your COGS versus revenue make sense, the marginal cost of increased cloud resources a no-brainer--especially versus always-paid-for hardware. If you don't have such a linear relationship you're as much in the position of deciding whether the project is viable as you are anything else.

Re: I got pwned by my cloud costs

#413
post #362

Earlier quoted context omitted.

> networking setup is free/cheap/doesn't require a Cisco cert. you can trust a developer to set things up. Bare metal hosts set up the network for you. You may need to know how to configure a local network interface. Even if you actually rack and stack many colos will give you a drop with network set up. You don't need to do what you describe unless you are building your own DC. > object storage is so much easier tha…

Haven't even heard of DataPacket, thanks for the link! And yeah I agree about the "some services are super low cost so you get hooked" thing. Always been my impression of Amazon: they look for what they can apply scale savings on (usually object storage, it seems) and make it cheap and then over-charge for almost everything else.

AWS is the new Oracle.

Re: I got pwned by my cloud costs

#414
post #347

Earlier quoted context omitted.

There are no savings with cloud, weaving or not. You want to waste money? Hire a car, with a driver, when you need it. Want to save money. Learn to drive. You always pay more for outsourcing stuff, a lot more, than doing it yourself. You can buy 1000x the processing power, by buying baremetal. You can get 100,000x more bandwith for cost, when not using the cloud. People think baremetal is hard. It isn't. It does take…

>You want to waste money? Hire a car, with a driver, when you need it. > Want to save money. Learn to drive. Oh please. As if learning to drive is the end of expenses. If you finance a car, you have monthly payments. If you don't, then you have periodic recurring maintenance bills. You always have fuel charges. You always have insurance charges. You periodically have parking charges. I know how to drive, but do not o…

very well put, i also rent cars because i rarely need them.

but i think where this analogy breaks down is that if i run a service, no matter how many users, peaky or not, at least 1 server always needs to be on, not "from time to time".

Re: I got pwned by my cloud costs

#415
post #269
post #133

Earlier quoted context omitted.

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.

You have thousands of containers? Physician, heal thyself.

Re: I got pwned by my cloud costs

#416

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 keep hearing this argument against using your own infrastructure again and again, and I'm not sure how true it is. I've worked with teams on both sides, and everyone is gonna have to deal with figuring out how to run at scale, it's just different ways of achieving that. I've worked with teams that manage their own infrastructure with dedicated servers, and not having to think about scaling for a long time as the on…

Yeah agreed I haven't worked with Google scale companies but I've always found scaling issue to to development related not infrastructure related. So examples would be a bad db query that takes the system down, overly chatting webserver that issues too many queries to the backend, pulling large datasets into the webapp causing exhaustion of memory ...etc. AWS / Azure can't be these issues they have to be fixed in your code.

There is definitely a place for AWS/Azure and their offering of services is fantastic but they are not a silver bullet for scaling your website to millions of active user.

On another point though the vast majority of websites you'll ever build won't have that level of active users. It's a good problem to have though as it means your site is doing really well.

Re: I got pwned by my cloud costs

#417
> I always knew bandwidth on Azure was expensive and I should have been monitoring it better

It's suspicious that cloud providers STILL don't have any sort of "circuit breaker" infrastructure for this sort of thing - yes, you can set up alerts, but you can't say, "shut the whole thing down before the costs go above a certain threshold".

Re: I got pwned by my cloud costs

#418

Earlier quoted context omitted.

> People think baremetal is hard. It isn't. It does take knowledge. This. I always wonder how much of the "clouds" success (economic, that is) would have materialized, if the marketing term never got traction, and everyone just called it what it really is: "renting someone elses hardware without physical access, and less, if any, control over how the stack works from the metal up". In the good 'ol days, when people w…

Except in what minute of my day am I supposed to take off the hat I'm currently wearing to put on my IT Server Room hat? I don't have time to wrangle this stuff any more. I have multiple clients, I have side hustles, I have what's left of a social life after pandemic, I have family obligations. There are only so many hours in a day. If my time become more effecient by throwing a bit of money at the problem, then it i…

There is a difference between freelancers/one person companies and big cooperations though.

Honestly, the question you need to ask in regards to cloud is a relatively simple one: Can I hire a sysadmin for cheaper than using the cloud?

The answer to that, once you start using enough resources, is more often than not yes.

Sure, it takes a while to get to that point, but eventually you will reach break even and it would be cheaper to do it yourself/have your employee do it.

Re: I got pwned by my cloud costs

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

Just did the calc and 600GB/day is about 55Mbit/s. That's really not a lot and if there's not too much computation server-side you could serve this from a raspberry pi at home (provided you have good uplink). But that's assuming you keep the CloudFlare cache of course, or as author mentioned himself, advertising only torrents for the multi-gig files. I really don't understand the cloud craze. Everything is more compl…

> 600GB/day is about 55Mbit/s. not really it was minimal traffic then sudden bursts of gigabytes. Of course throttling the big spikes would actually have been a good idea in hindsight to give an early warning.

Re: I got pwned by my cloud costs

#420
post #168
post #36

I wonder if before cloud computing, has there ever been a successful product / service where it was accepted with just a shrug that the volatility of monthly costs means it could bankrupt you with next month's bill, because of complexities and opaqueness of the cost structure make it virtually impossible to predict and protect against extreme peaks in all parts of the setup. Even if you run a relatively opaque cost s…

> Even if you run a relatively opaque cost structure business like a restaurant, you can still calculate the maximum cost of ingredients for one month, the salaries, energy, etc. If the restaurant suddenly ordered ten thousand times more ingredients than usual, their supplier would probably call back and say "is that really what you want?" rather than just shrugging and shipping them tonnes of tomatoes with a bill fo…

In this scenario though you’ve used tonnes of tomatoes and they’re now asking you to pay
Post reply on HN