Hacker News new | past | comments | ask | show | jobs | submit login

Cloud Functions is single concurrency, meaning every new request causes a cold start (generally speaking).

Cloud Run can be single or multi-concurrency (defaults to 80), meaning one in 80 requests globally causes a cold start (again, generally speaking, assuming the container isn't CPU bound below that, etc.).

So, if both are running in single concurrency mode, you'll likely see similar cold start time; however, since you can go multi-concurrent in Run, you'll likely see better performance, especially when scaling up.

A nice side effect of this is that your costs will also drop, since you can pack more requests into your instance.

Edit: as noted in the other thread, because you control the container image, you can optimize that (e.g. use Alpine instead of Ubuntu) to reduce weight and decrease cold start time. But if you're using a language like Java, it's possible that starting the JVM and framework is going to be more expensive than the OS load time, so it might be a wash.




Sorry, just asked a similar question in response to a different comment, but just saw this detailed response. Do you know if there are any plans to add 'warmup requests' to Cloud Run like in App Engine?


Replied there!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: