DEV Community

loading...

Discussion on: How Cloud Run changes Cloud Architecture

Collapse
patricknelson profile image
Patrick Nelson • Edited

Now Cloud Run has a relatively new feature called min-instances.

I was so happy when they finally added this!

Another great solution (now thankfully no longer necessary): I was using Cloud Scheduler and creating separate warm-[service] jobs for each individual Cloud Run service that I needed to have always available. This would effectively just hit the service once every 10min-15min to ensure that Cloud Run would either keep the container around or, more importantly, spin one up due to the latest request so that this headless task (from Cloud Scheduler) would take the brunt of that initial startup penalty so that regular end users wouldn't have to.

It was particularly tedious when they were authenticated services, since it required also configuring the task to include the Auth header and use a service account to authenticate (more info on how to do that here).

Collapse
patricknelson profile image
Patrick Nelson

Oh, I forgot to mention: They finally also added the ability to put Cloud Run services behind their Cloud Load Balancers, which is awesome. Now you can benefit from all sorts of additional features such as custom SSL certificates and Cloud Armor as well. This is actually old news as it turns out (July 16, 2020) but I'm still excited to take advantage of it when I get the chance.

cloud.google.com/blog/products/net...

Collapse
tomlarkworthy profile image
Tom Larkworthy Author

yeah I used to do this too!