Google Cloud Functions warmup time

Viewed 2221

Do we know what the warmup/cold-start time is for a function on the new (still beta as of now) Google Cloud Functions? Or the timeout before it cools down again?

I've been trying Azure functions in the per-use mode, and it's been ridiculously bad - seemed inconsistent but I've seen 30 seconds, and it seems to be about 5 minutes of no-use before it cools down again.

I'm assuming Google's functions have the same issue, but I don't see even preliminary documentation on those time periods. The answer seems to be a "ping" every X minutes to keep it alive, but knowing what that X should be would make a difference in billing.

1 Answers

There is an interesting blog post by Mikhail Shilkov, published in August 2018. At this time and based on his experiments, the minimum alive period observed for Google Cloud Functions (GCF) is 3 minutes:

Orange dots are warm and blue ones are cold

As a consequence, using X=2 should be enough to keep a single function warm and ready to serve a request. However, in that case, you should ask yourself whether it is still relevant to use a serverless solution such as GCF.

Related