Live data from Hacker News

Serverless: Cold Start War

mikhail.io

41–50 of 110 posts

Re: Serverless: Cold Start War

#41

Lambda is not useful. It solves a few problems but creates even more new problems. Some problems include: - It makes managing multiple environments (e.g. development, staging, production) almost impossible. - It makes debugging difficult because you can't run the code on your own machine and step through the code. Most projects cannot be tested end-to-end due to environment incompatibilities between different service…

Many of the problems you notice are correct, but...

> It makes managing multiple environments (e.g. development, staging, production) almost impossible.

I don't know why you say this? In my experience, this was one of the most amazing parts: my CI/CD setup simply deployed a new Lambda function for every branch in my repo, which was equivalent to the production one in terms of environment.

> It makes debugging difficult because you can't run the code on your own machine and step through the code.

It took some work to initially setup, but I did manage to do this pretty well. Perhaps related to the next point:

> The lock-in factor is significant; once you're hooked into Lambda and all the surrounding services that it encourages, you cannot leave and you have no bargaining power in terms of hosting costs and your future is entirely dependent on Amazon.

This is true, but can be mitigated. I restricted the lock-in to the entrypoint, and managed to transfer my functions elsewhere later with relatively little effort. In this case, the Lambda functions were behind an API Gateway proxy, and I converted them to the same interface used by Express.js before passing them to my business logic. That allowed me both to execute the business logic locally, and to migrate it where it is running now, on a standard Express.js server.

> It takes the fun out of coding.

Well, I can just say that it was still fun for me - most of the fun usually is in the business logic, although the experience of simply experimenting in a different branch and having a complete production-like environment pulled up for that still amazes me.

Re: Serverless: Cold Start War

#42

I think there is a business case for a small app where you could input the url of your function and have it called every ‘x’ seconds or minutes to keep the function warm. Would anyone here use it? I can put together a small app in a few days.

There are some, e.g. https://github.com/jeremydaly/lambda-warmer and my post https://mikhail.io/2018/08/aws-lambda-warmer-as-pulumi-compo...

Re: Serverless: Cold Start War

#43

I think there is a business case for a small app where you could input the url of your function and have it called every ‘x’ seconds or minutes to keep the function warm. Would anyone here use it? I can put together a small app in a few days.

A few days to put `curl $url > /dev/null` in a crontab? Are you kidding me?

He is describing an HTML+JS solution. Even then, it's just a few lines of JS - create an image or a script object with a given URL, append it to the body.

Re: Serverless: Cold Start War

#44

I'm still a bit puzzled by the hype around FaaS. It seems like a useful tool for things where you don't want major queuing under pressure, but you can tolerate human perceptible delays. But it also seems easy to build a big ball of mud deeply tied to the nuances of the chosen FaaS provider. It just seems like most use cases are probably going to be just fine with more conventional horizontal scaling techniques. But I…

> I think I missing something Koolaid.

This made me smile because I too have been puzzled by the hype around serverless. I'm sure it does have its uses but it wouldn't provide an acceptable solution for any of the problems we currently need to solve. Not saying that won't change but I do find it vaguely irritating that serverless has at times been presented to me as an end to all woes when that clearly is not the case.

Re: Serverless: Cold Start War

#45
post #22

Two things. 1- It's amazing that Java has the fastest cold start time! Faster than Nodejs.[1] That's exactly the opposite of what I've heard before. 2- I am so tired of hearing about cold start times for dormant apps as if that is the only cold start scenario. It is arguably a worse problem to have cold starts when scaling! What do I mean by cold starts when scaling? You adopt serverless. Things go great. Your app is…

Yes, one could prewarm N instances by sending N parallel requests every 5 minutes. You have to know N though :)

For most apps, scale-out cold start won't be too much of a deal breaker: longer instance lifetime + shorter start will do the trick. And wait for the next wave of optimizations from vendors, I'm sure there's more to come.

P.S. I'm the author of OP, thanks for reading!

Re: Serverless: Cold Start War

#46
So, what is the killer app of faas? To my layman understanding the selling point is easy scale-ability, but it seems to be inherently at odds with serverless being the most expensive computing model?

Re: Serverless: Cold Start War

#47

Tech, to Business: So, hear me out guys. With the power of "The Cloud", we can break our compute workload down to the function level, and have them run as a service for us, rather than say an entire VM, or even an entire container. And because it's a "Cloud" service, we pay for what we use, so if there's no workload for the functions to service, there's no cost. We just pay for the time the tiny little container is a…

That's all plausible except the price issue. Say, you keep 10 containers alive, so you make 10x 100ms calls every 5 minutes. That's gonna be $0.20 per month. 20 cents.

Re: Serverless: Cold Start War

#48
post #46

So, what is the killer app of faas? To my layman understanding the selling point is easy scale-ability, but it seems to be inherently at odds with serverless being the most expensive computing model?

IMO, every greenfield app that can benefit from "just focus on your business code" model.

P.S. I'm the author of OP, thanks for reading!

Re: Serverless: Cold Start War

#49

Lambda is not useful. It solves a few problems but creates even more new problems. Some problems include: - It makes managing multiple environments (e.g. development, staging, production) almost impossible. - It makes debugging difficult because you can't run the code on your own machine and step through the code. Most projects cannot be tested end-to-end due to environment incompatibilities between different service…

Have you heard of the Serverless Framework? It solves some of those problems, including handling dev/staging/production environments.

I do think you raise some great points however.

Re: Serverless: Cold Start War

#50
post #18

An alternative approach for user facing apps is to connect directly to the database from the browser. Lambda still has a role to play in such an architecture, but hopefully most of your basic crud operations can go direct, with less commonly called functions like login depending on Lambda. I address this option about 2/3 of the way through this webcast on serverless best practices https://blog.fauna.com/webcast-video…

What about security? And connection pooling etc?
Post reply on HN