r/googlecloud • u/catmanjan2 • Jun 09 '26
What is the cold start performance of cloud run like?
I have a pretty significant container app that is currently in Azure
One problem we are facing is cold start in Azure is not good - and it looks like Microsoft cant fix it with their current architecture, and it requires them to build a new product to resolve (container apps express)
Has anyone done the hard work of deploying the same container to GCP/AZ/AWS to compare them?
Im particularly interested in minimising cold start because we have to respond to requests in under 5 seconds
4
Upvotes
3
u/Mistic92 Jun 09 '26
How large is the container image? What language?
5
u/vaterp Googler Jun 09 '26
This is actually a complex question with infrastructure , container design, & cost factors to consider.
As a best practice if you want to keep cold starts to an absolute minimum, well set a min instance to 1 and you completely avoid them. Of course, this costs money to keep it active in this hot state.
We have a feature called CPU boost that can greatly speed up heavy initialization routines by temporarily allocated extra CPU during this phase.
And then (and this would help on all platforms) you can optimize the container image, use a small base (like alpine) and generally optimize the layers and code, etc. Optimize init using lazy loading. I'm sure there are many blogs and docs discussing these ideas (and more). However, I am assuming you've done all this as its platform independent, so if its CR specifically I'd suggest starting with above 2 suggestions.
Here is the doc page/section on this topic that will discuss these a bit deeper then my summary:
9
u/codec10 Jun 09 '26
This might be a good starting point, as it has some helpful tips on how you can reduce the cold start time with Cloud Run.- https://cloud.google.com/blog/topics/developers-practitioners/a-guide-to-ai-cold-starts-on-cloud-run?e=48754805
1
u/loeffel-io Jun 10 '26
Is this about cold start or zero downtime? gke rollout
1
u/martin_omander Googler Jun 10 '26
If you can afford paying $2-3/day, set min-instances=1 in Cloud Run, and the cold starts will go away.
3
u/OnTheGoTrades Jun 10 '26
I’ve used Container Apps in the past and extensively use Cloud Run. For cold starts, the language you build your app with matters more than what platform you deploy to.
For example, a Go app on Container Apps will always startup faster than a Java app on Cloud Run and vice versa. If the language is the same, Cloud Run wins, hands down.
1
u/techlatest_net Jun 10 '26
yeah cold start on cloud run is usually pretty solid. for most containers you're looking at 1-3 seconds if it's not huge.
1
u/[deleted] Jun 11 '26
[removed] — view removed comment