ahmetb / cloud-run-faq

Unofficial FAQ and everything you've been wondering about Google Cloud Run.
https://cloud.run
Creative Commons Attribution 4.0 International
2.32k stars 124 forks source link

Offer extended commentary on keeping services hot #135

Closed atrauzzi closed 3 years ago

atrauzzi commented 3 years ago

In the section about keeping cloud run services warm, the following is suggested:

You can also work around "cold starts" by periodically making requests to your Cloud Run service which can help prevent the container instances from scaling to zero. For this, use Google Cloud Scheduler to make requests every few minutes.

I'm okay with this idea, but what I'm interested in hearing are some general thoughts around a few topics when using Cloud Scheduler to keep a Google Cloud Run service hot:

I think you get the overall idea here, some forward thinking commentary on likely gotchas might help people who are evaluating Cloud Run for latency-sensitive services.

Even if keeping a Cloud Run service warm means paying more than a service that's allowed to go dormant, if that amount is still comparable to any other always-on PaaS right now, Cloud Run's other features and abstractions are attractive enough to justify configuring a measly Cloud Scheduler.

But only if that's the only compromise! :wink:

ahmetb commented 3 years ago

Sorry but this repo is not the forum to discuss this and I can't answer these either.

Feel free to report this to our public issue tracker.

atrauzzi commented 3 years ago

Hm, dang. I was hoping there would be some conventional wisdom around this, nothing too detailed. But just enough to help people out.

I've opened a thread over at the official issue tracker, hopefully somebody there is willing to speak on it.