Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GCP Cloud Function Instance lifetime

I've worked with the AWS environment for 4 years, mostly with Lambdas. From my experience, I know that an "instance" of a Lambda function will live aprox for 2 hours.

Now I'm going to work for a project with GCP and their Cloud Functions: is there any information about how much time a CF "instance" will live?

I generally need to know that in order to better understand how frequently we will face a cold start.

like image 262
abierto Avatar asked May 05 '26 08:05

abierto


1 Answers

This can get complicated since Cloud functions can be multi-regional and scale up and down as your apps need, from our experience it was about a 30-minute cooldown.

To quote the documentation:

The environment running a function instance is typically resilient and reused by subsequent function invocations, unless the number of instances is being scaled down (due to lack of ongoing traffic), or your function crashes.

You can find this and more, here: https://cloud.google.com/functions/docs/concepts/exec#function_instance_lifespan

like image 191
DIGI Byte Avatar answered May 07 '26 17:05

DIGI Byte



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!