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:
Simplifying Continuous Deployment to Cloud Run with Cloud Build including Custom Domain Setup(SSL)
Cloud Run is fully managed Serverless product launched by Google Cloud for public beta availability which offers to run…
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
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.
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
REDISPORT are automatically added and can be used by the application code.
Firebase Hosting enables to get a nice
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.
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.