Re-visiting Cloud Run[Mid 2023]

Raju Dawadi
3 min readJul 30, 2023

--

Back in 2019, when Cloud Run was in public beta, I had covered the overview of running code from Github to exposing via a Load Balancer in this post:

After 3 years, I am covering how much interesting Cloud Run has become and feature expansion is done by GCP team.

Cloud Run could support a wide range of workloads considering the resource spec available, support for jobs, scheduler and integration with other GCP services.

Capacity Expandable up to 8core/32GB

A totally customizable resource allocation is possible and that is up to 8vCPUs and 32GB which can cover a wide range of services. This can be further fine tuned by setting the maximum concurrency i.e. concurrent requests that can reach each container instance.

Enhanced Health Check

Health Check options in Cloud Run

With the support of TCP, HTTP and gRPC health check for both Liveness and Startup check, the achievement of zero downtime as well as container health monitoring is well assured.

Integration with Redis(Memorystore), Firebase

Custom domain integration(SSL included) with Google Cloud Load Balancers was already there but the integration with Redis and Firebase is new.

Cloud Run Integration List

With the integration of Memorystore, it gets easier for setting up a connection to redis server in just few clicks. After the integration is enabled, the environment variables REDISHOST and REDISPORT are automatically added and can be used by the application code.

Firebase Hosting enables to get a nice web.app domain.

Jobs that could run up to 24 hrs

This is one of the most interesting service that I vouch for in Cloud Run and was in long wait. With the available resource(8/32) and 24 hours of timeout, it enables us to run a wide variety of workload. Scheduler is also auto integrated that provides option for trigger at cron format or manual trigger or immediate run. Running jobs whether it for data processing or anything can be configured in this single serverless environment.

Continuously deploy new revisions from a source repository

In earlier blog post that I mentioned had longer steps to go through Cloud Build and setup trigger but the process is way simpler now.

Create trigger for cloud run — cloud build

By simply clicking on “Continuously deploy new revisions from a source repository”, we can setup the connection with Repository Providers: Github, Bitbucket, Cloud Source Repositories and trigger as required which could be branch/tag/regex. No more additional steps required for this.

Whether you want to run a simple demo app for few hours or a production grade app with full deployment flow, Cloud Run is now a choice for multiple use cases. By using the serverless environment, we need not to bear the hassle of updates and upgrades of the backend system as well as horizontal scaling of resources. But we need to do some experiements on the resouce allocation, number of concurrent requests it could handle and suitable health check for serving the traffic.

That’s it for this post. If you are interested on getting my interesting updates, find me on Linkedin, Twitter.

--

--