4 ms·
> We run our monolith (Spring boot) as a Docker service Does Cloud Run's free tier 'sleep' containers when they don't get regular traffic? Several years back
by paws 6y ago
> We run our monolith (Spring boot) as a Docker service
Does Cloud Run's free tier 'sleep' containers when they don't get regular traffic?
Several years back Heroku nerfed their free tier -- they would proactively place low traffic apps into 'sleep' mode so the next request would have a noticeable several second long delay.
I ask because our SpringBoot monolith takes 30s to startup, and has bursty traffic, so I was of the expectation that Google Cloud would probably 'sleep' low traffic containers like this also. Would be nice if that were not the case.
- dakna 6y agoTake a look at the recently introduced minimum instances setting : https://cloud.google.com/blog/products/serverless/cloud-run-adds-min-instances-feature-for-latency-sensitive-apps https://cloud.google.com/blog/products/serverless/cloud-run-...
- nikon 6y agoIt will starve the container of CPU, but might not 'sleep' it for a while. So wake time can actually be really quick if you have had traffic recently.
- jillesvangurp 6y agoYou can set the minimum instances to 1 (default 0) or simply call the service regularly from somewhere. Both approaches work. When it gets killed, we have a 30 second latency on the first request. If you have a busy server, it will pretty much stay up. I actually only set the minimum instances to 1 a few days ago as we at this point are preparing to onboard some customers.