We have a Docker container that packages a Java Spring Boot application. The application sometimes takes about 40 seconds to start.
Is Google Cloud Run suitable to run such a "heavyweight" application?
Let's say it'd be scaled down to 0 replicas, then the following would take 40 seconds upwards to be processed. Or is there some logic on Cloud Run's side to avoid such a case.
You can't avoid the cold start cost when Cloud Run starts a new virtual server instance. If 40 seconds is unacceptable overhead to handle an incoming "cold" request, then you might want to pay for a servers that stay running 24/7.
You can't avoid that 40 second spin up time. So it really depends on how often you're calling it.
We use spring boot + gke, cloud run would make no sense unless the code was used like once a week. (That's maybe dramatic, but you get it).
If you have end users interacting with that, it's probably unacceptable. If it's just an API endpoint for some automation then you're only annoying skynet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With