Live data from Hacker News

Serverless: A lesson learned the hard way

sourcebox.be

61–70 of 139 posts

Re: Serverless: A lesson learned the hard way

#61
post #54

Earlier quoted context omitted.

Eh, if I'm deploying a cloud function, the server truly doesn't exist for me. It's more like a Web Worker running in a privileged environment. I'm ok with the name.

No, it's really a server running your function. You just (are told you) don't have to worry about the server or what it's actually doing.

> You just (are told you) don't have to worry about the server

...until you receive the $206 bill for the work done by the server.

Re: Serverless: A lesson learned the hard way

#62
post #43

He obviously has a smaller account so Amazon might be less flexible, but it's worth contacting support and explaining the error. Sometimes they do give your money back in my experience.

In my experience flexible starts north of few mil. per month spend so why all the startups are running on AWS is a mystery to me.

Re: Serverless: A lesson learned the hard way

#63
post #54

Earlier quoted context omitted.

Eh, if I'm deploying a cloud function, the server truly doesn't exist for me. It's more like a Web Worker running in a privileged environment. I'm ok with the name.

No, it's really a server running your function. You just (are told you) don't have to worry about the server or what it's actually doing.

But that works on the VPS level too. We're just talking about higher levels of abstraction on top of hardware. Which one stops being a "server"? I'd argue that once you lose the OS, it's no longer a "server".

Re: Serverless: A lesson learned the hard way

#64

Earlier quoted context omitted.

Azure has this. When you hit your spending limit, it shuts down your services.

They didn't a year and a half ago. Created a 3k bill for my employer over RemoteApp. Yeah, charge per user, they said. Oh yeah, min 20 users, and we round up - of course in small print at the time. Unless I have hard guarantees, I give "cloud providers" re-loadable cards. Can't take more money than what's on there.

It's been around a while, but I looked into it and it looks like it's based on the type of account you have[0]. I've only had the accounts that had spending limits as an option. I'd imagine a lot of people are on Pay-As-You-Go, so many people won't have the ability to set spending limits. Frustrating that they would lock these features behind different plans.

[1] https://azure.microsoft.com/en-us/support/legal/offer-detail...

Re: Serverless: A lesson learned the hard way

#65
post #29

This is not a "Serverless" problem; this is a mistake a developer made that used a pay-per-use system. If I write code that launches EC2 instances and I accidentally set it to launch an instance every second instead of minute because I divided wrong, that's my fault.

It's "serverless" in the sense that if the developer had provisioned a "server" then the max incursion of cost would equal the cost of that server, no more no less. So yeah, let's blame the developer, but let's not play like mistakes don't happen and they're not costly in the "serverless" world.

Use EC2, set an auto scaling threshold on CPU utilization, do something dumb, you’ll find you ran “a server” x n.

It’s easy to burn tens or hundreds of thousands ‘accidentally’ on “server”, easier than on serverless.

If you’re spending real money, you should have an account team. Talk to them if such a problem happens.

Re: Serverless: A lesson learned the hard way

#66
post #36

Earlier quoted context omitted.

LOL WAT? How is it "serverless" if you're provisioning a server?

He's saying that the problem is with "serverless architecture", because the problem could not possibly have happened without the use of a serverless architecture (e.g. provisioning a server). The problem is exclusive to serverless.

That’s what he’s saying but that’s not correct.

Re: Serverless: A lesson learned the hard way

#68
post #42

Earlier quoted context omitted.

Yes, but that isn't always the right answer. If your system is starting to cost "a lot" is that because of a bug (this case), or is it because your idea just "went viral" and you are not getting tons of paying customers signing up? If it is the latter you do not want any rate limiting, you want everything to scale as fast as possible (I hope there are no bugs on your end). Rate limiting means that your new customers…

It's almost as if... they should offer multiple options so customers could choose based on their business/hobby needs: 1. Warn me at $X but don't throttle me for any reason--I'll pay if I go viral 2. Warn me at $X and start throttling until I get to $Y at which point stop service and stop charging 3. Warn me at $X and stop service/charging immediately

You can optimize step 3 away into step 2.

Re: Serverless: A lesson learned the hard way

#69

"The actual cost is now $206 and over $1000 forecasted, it makes me think twice about using pay-per-use services in the future." Never use a pay-per-use service that does not include a reasonable "turn off after $X" feature and appropriate warnings. Also, never use such services without being sure to configure such settings. I like to think of this as a self-inflicted "DDOC" attack: Distributed Denial of Capital. Bes…

In a past life as a cloud (VDN) provider, this was a real trade off.

When you have customers doing events, it’s more often that the scale up is from a real event than that someone fat fingered a config.

If they are broadcasting an unscheduled Obama speech from home page of a major paper, that’s not the time to go “Oh, anomalous, shut it down.” By the time that gets fixed and back on, Obama’s left the building - and your customer leaves too.

If you are in the business of offering a service with “elasticity” as a core capability, we found it better for SLOs and better for the bottom line to ‘fix’ this after the fact by discussion than to attempt to tell real spikes from glitches.

If you don’t want elasticity, you might not be looking for “cloud”.

Re: Serverless: A lesson learned the hard way

#70

"a $180 actual cost. I was left with a light headed feeling, it's a lot of money for me" people still play with fire. limit your losses, go with digital ocean or something for 5$/mo flat no matter what.

His previous blog post actually said that he moved away from the exact $5/mo digital ocean plan you're talking about, to this.

I think the author meant to do this less of a "play with fire" way but more of experimenting with new tech way. But yes, I agree that for personal sites, running with your own money, you probably want to stick with something safer like the $5/mo digital ocean box.

Post reply on HN