Live data from Hacker News

Serverless: slower and more expensive

einaregilsson.com

431–440 of 733 posts

Re: Serverless: slower and more expensive

#431

This is how a conversation with a colleague who were enthusiastic about Serverless, and who's company was mostly on Java/JVM stack went: Colleague: Lambda is awesome, we can scale down to zero and lower costs! We love it! We use cool tech!! Me: What did you do about JVM warm up? Colleague: We solved it by having a keepalive daemon which pings the service to keep it always warmed up. ... Me thinking: Uhh, but what abo…

Your “thoughts” are applying his solution to the wrong problem. “Start small and stay small” I’m not sure what that even means. Are you saying every service has to grow to some size or required amount of compute? LOL

The 100ms extra time is nothing. I mean - are you trying to solve at Google or Amazon scale?

I run simple Lambdas that read from some SNS topics, apply some transforms and add metadata to the message, and route it somewhere else. I get bursts of traffic at specific peak times. That’s the use case and it works well. The annoying part is Cloud Formation templates but that’s another topic.

Re: Serverless: slower and more expensive

#432

Earlier quoted context omitted.

Agreed, let me add my 2cts : >The whole idea of serverless is so you don't have to manage infrastructure. ...when you are validating your product/market (100 request/day is a success here). Not everyone on HN is a core dev, tech is getting democratised. So 1 week of time dealing with servers and accounts and infra is a week not asking the right questions.

It really depends what you're doing. I've been trying out serverless on-and-off for weeks now and still don't have a basic two tier application going the way I want. I'd have been substantially better off dropping $5/month on a DigitalOcean droplet and running PostgreSQL and Rails on it. DigitalOcean even has really helpful templates to start up basic servers. This may be a specific criticism of AWS Amplify, but all…

> DigitalOcean even has really helpful templates to start up basic servers.

> I'll admit I'm a sucker for infrastructure as code.

... which you have to maintain, which probably means Ansible/Chef/Puppet/Salt/etc scripts. Which is fine, it's just a trade-off. I've spent weeks maintaining those kinds of things though, and inevitably when you come back in a year, something's broken.

CloudFormation isn't great, but it usually gets the things provisioned - CF Cognito support sucks though, and haven't been impressed with Cognito at all. Seems too enterprise-y. Like e.g. CodeBuild, which supports 0 open-source use-cases. IDK what some of those teams are doing, but even Azure Pipelines is years ahead.

I think that's a general problem with AWS at the moment. Too many sub-par offerings. Still worth it for S3, DynamoDB, SQS, and Lambda or EC2 (just, the EC2 UX is awful). And those are huge time savers.

Re: Serverless: slower and more expensive

#433
post #12

I disagree with all the comments posted so far. This should be a perfect use case for lambda, not "oh you're API is receiving more than 10M req/day? Use Elastic Beanstalk instead with an EC2 instance and ELB". This kind of comment is just to abuse the free tier that AWS provide you with. The whole idea of serverless is so you don't have to manage infrastructure. OS patching, mucking around with Docker and and port fo…

Exactly. Like anything, right tool for the right job. I was hosting my personal website on EC2 with an RDS instance and it cost around $20/month. But since the site gets little-to-no traffic and I got sick of EC2 upkeep, I switched S3 & Cloudfront: now my bill is $0.80/month. Another example: at work we inherited an old EC2 instance that was set up solely to run cron jobs on other servers. Occasionally it would lock…

I can also vouch for this. I run a low traffic website on S3 and Coudfront. And Lambda is perfect for handling the small amount of dynamic content or form processing that it requires. It costs cents a month to run and doesn't need any maintenance.

Re: Serverless: slower and more expensive

#434

Finally reality is catching up to the hype. I was saying this 3 years ago. Tech should be about results, it should not be a religion. We should accept that most famous CTOs, engineers and other "thought leaders" are not geniuses (also, they're often corrupted by financial interests) and we should not outsource our decisions to them. To innovate, we need to start thinking independently and make our own rational assess…

Everytime I read these types of articles, I immediately login to AWS billing console and review our costs.

We switched to AWS serverless about a year ago (API gateway and Lambda) and there have been no real surprises.

I've been able to increase our contractual SLA uptime to customers (and charge for it).

We can kick-off more backend async processes and let the magic of auto-scaling just do it's thing.

If anything, I now have a fear of getting too complacent, as we no longer have a FTE SRE monitoring infra. If something goes seriously wrong, we have to rely on our DevOps AWS console skills to troubleshoot.

But similarly, if the power goes out in California, I have to rely on PGE to fix the issue. Serverless is also a cultural decision to outsource the infra.

Re: Serverless: slower and more expensive

#435
Serveless is a sort of a trap. Maybe a good thing for teams who do not have System Engineers, SREs, SysAdmins, etc., due its pragmatism and less cost of operation and maintaining, but its a blackbox: you don't know exactly what's going on and besides that, you don't know if it is really secure. Have to really measure the trade-offs of having and not having this technology on your environment. Don't get caught by the buzzword, and try to really understand, benefits and non-benefits of this approach.

Re: Serverless: slower and more expensive

#436

Earlier quoted context omitted.

Exactly. Like anything, right tool for the right job. I was hosting my personal website on EC2 with an RDS instance and it cost around $20/month. But since the site gets little-to-no traffic and I got sick of EC2 upkeep, I switched S3 & Cloudfront: now my bill is $0.80/month. Another example: at work we inherited an old EC2 instance that was set up solely to run cron jobs on other servers. Occasionally it would lock…

I wonder if it's a generational thing but it seems to me that people nowadays have forgotten that you can host more than one site or database per server. Failing that shared hosting still offers amazing value if you don't need anything to weird e.g. someone like Bluehost or Hostgator offers unlimited* sites + databases for about $5/month

I host a site on S3, CloudFront, and Lambda and I'm always looking at the billing to see when it's time to graduate to a normal server setup. It's not going to be a huge project to switch from the existing setup to a docker style setup on one server. So, I'm keeping the site on S3 until it becomes favorable to move it.

Since the organization only has the one site, there's not enough usage to warrant $5 a month for even a tiny a virtual server.

Re: Serverless: slower and more expensive

#437

Earlier quoted context omitted.

> For the 80% or more, serverless works just fine. Cite this. I don't believe you. I'm across a pretty broad slice of industry and can only draw on anecdotes from colleagues, but the majority of people with actual hands-on experience are disillusioned and say that the biggest (only?) drive for serverless at this point is top-down organisational pressure created by technically incompetent strategic management that loo…

I don't think the only drive is top-down. I work in a place where devs get a lot of say in which tech we push (other than core languages; more just for hiring/market/support purposes) and there are a lot of devs that seem all about serverless .. and then are on 3 hour support calls with me because they can't get some set of A + B + C components working with lambdas. I haven't done direct development with lambdas, but…

API Gateway gets expensive when things get busy. App load balancers also let you point methods at Lambdas though, so nowadays that's likely a better idea (and certainly more serverless) than doing the routing in nginx.

Re: Serverless: slower and more expensive

#438
post #14
post #3

> For us it would have been better if we could just put a normal load balancer in front of Lambda. This can be done. https://aws.amazon.com/blogs/networking-and-content-delivery...

Yes, it would be a much less dramatic headline if they'd used an ALB instead of an API Gateway, it shows the complexity of the AWS product offering though that someone picking up lambda for the first time didn't find this out. They already have a classic ELB in place, so switching to an ALB wouldn't be a significant change in cost or capability (the ALB is often cheaper, though it's hard to tell in this case)

I didn't know you could do this. For anyone interested here's a simple CF template that illustrates this scenario [1].

[1] https://github.com/s0enke/cloudformation-templates/blob/mast...

Re: Serverless: slower and more expensive

#439
post #417

Earlier quoted context omitted.

Kinda wild in your post history you're advocating for AWS as a cheaper superior platform without disclosing that you work there.

Yup! Haven't done it in years and created this different account to be more clear/direct in who I am. That is also why I called it out at the start and bottom of all my responses. Thanks, - Chris Munns - AWS - Serverless - https://twitter.com/chrismunns

[meta] Please stop downvoting this. Clearly those comments were years ago and clearly the author has been doing the right thing for years since.

Re: Serverless: slower and more expensive

#440
post #347

Earlier quoted context omitted.

Hi there, Hey there, I lead Developer Advocacy at AWS for Serverless ( https://twitter.com/chrismunns ). I'll give you that this 80% number seems pretty out there. I don't know how that is measured or what it would be referencing. If you step back and remove all the commercial software from the argument (something like 50%+ of enterprise workloads, the kind of things you buy from a 3rd party and just run it, like Sha…

Kinda wild in your post history you're advocating for AWS as a cheaper superior platform without disclosing that you work there.

Maybe that's how he got the job.
Post reply on HN