IronWorker CaaS Worker: Google Cloud Run Setup
Setup Outline:
Click on the “Create Service” Button.
Select the region, selected regions only supports Container Triggers
Enter a service name and click on “Next”
Specify the container Image from Google Container Registry, and click “Next”
Allow unauthenticated invocations to allow HTTP triggers and click “Create”
2. Trigger the Container App
After Creating the Cloud Run service, go to the container URL to invoke through HTTP.
Click on the “Tiggers” tab to add different triggers, you can select any of GCP services an example is GCP Pub/Sub to invoke your worker once a message queued.
3. Limits
Main Google Cloud Run limits are :
Maximum number of services: 1000
Maximum number of container instances: 1000 Maximum memory size, in GB: 8
Maximum number of vCPU: 4
Maximum number of concurrent requests: 250
More quotes details: https://cloud.google.com/run/quotas
4. Costs
Charges are calculated for CPU, Memory, Requests, and networking according to your usage tier and the deployment region.
Mord on Cloud Run pricing here: https://cloud.google.com/run/pricing
5. Notes
Google Cloud Run is one of the powerful serverless building blocks offered by Google Cloud; you can integrate with Firebase and other GCP services.
Easy to deploy, no abstractions, good web debugging console.
The only thing I didn’t like is the restriction to use Docker Image from Google Container Registry only, which is sometimes can be annoying to configure and authenticate with gcloud CLI SDK.
7. Pros & Cons
Pros of Cloud Run are the ease of setup with minimal steps, can quickly be integrated with other GCP services and firebase components.
Unlike IronWorker doesn’t come with tasks scheduling and don’t support using DockerHub hosted images.