DEV Community

Discussion on: What's the WORST thing about serverless?

Collapse
 
mbackermann profile image
Mauricio Ackermann

Cold start can be an issue.

Collapse
 
trusktr profile image
Joe Pea • Edited

We have the same issues with AWS lambdas where I work. Sometimes 30 seconds just to "warm up". It's retarded!

Collapse
 
mbackermann profile image
Mauricio Ackermann

Besides that, configuring lambdas was a pain, at least to me.

Thread Thread
 
trusktr profile image
Joe Pea

Yeah. It's a pain! We don't have any customers yet, but we're paying thousands just to set up the Lambda infrastructure, which I think is not the best way to go about things, but its not my choice. Ideally we should write a single stateless server that is always on, and when we need to scale then we can figure how to deploy to Lambdas. At the moment, we're completely coupled to Lambdas and we can't run our services outside of Lambdas, which make development a pain.

Collapse
 
mjsarfatti profile image
Manuele J Sarfatti

How much of an issue? Like milliseconds, seconds...?

Collapse
 
mbackermann profile image
Mauricio Ackermann

Some seconds. I had some functions that took something between 4 and 5 seconds on cold start.

Thread Thread
 
umelf profile image
Molese Kekana

Shouldn't you break apart such functions?
It sounds like you're trying to do too much in a function.
What technology stack are you running?

Thread Thread
 
mbackermann profile image
Mauricio Ackermann

Iโ€™m running node. My functions are very small, doing a tiny service

Collapse
 
arswaw profile image
Arswaw • Edited

I'm sure you know this, but sometimes you can run a script that continuously invokes it.

Collapse
 
rcoundon profile image
Ross Coundon

That helps but doesn't necessarily keep all the containers running, it typically depends on the scale and volume.

Collapse
 
mbackermann profile image
Mauricio Ackermann

I know that, but it doesn't seem to be a good practice

Collapse
 
avalander profile image
Avalander

That kinda defeats the point of only running it when needed.

Thread Thread
 
arswaw profile image
Arswaw • Edited

You run it every 30 minutes, just as the underlying container is about to close. You don't invoke it constantly.