Dualo
GCP Essentials

Cloud Run — Serverless containers

Deploy a container and forget about servers: Cloud Run runs it, scales it to zero when idle, scales up under load, and gives you an HTTPS URL.

1 min read

is the flagship. You hand it a container, it gives you an HTTPS URL. No server to configure, no OS to patch.

Magic trick #1: scale to zero. If nobody visits your app for 15 minutes, Cloud Run stops all containers — you pay $0. A request comes in → it starts a container in ~1 second and serves it (that brief delay is called a '').

Magic trick #2: automatic horizontal scaling. 1 visitor → 1 container. 10,000 visitors → Cloud Run spawns dozens of containers in parallel. Traffic drops → it tears them down.

You pay only for actual request-processing time (not idle time) + a bit for the RAM/CPU you declared. For a small app, that's often cents per month.

Perfect for: REST APIs, web apps (Next.js, Django, Rails), webhooks, background jobs via Pub/Sub. Not great for: long-running WebSocket servers, stateful apps, anything needing > 60min per request.

Comparison: Cloud Run = AWS Lambda with containers = Azure Container Apps. Cloud Run is arguably the cleanest of the three.

Diagram

Grounded on https://cloud.google.com/run/docs/overview/what-is-cloud-run

Next up

Cloud Build — CI/CD pipelines

Google's built-in build service: on every git push, it fetches your code, builds a container, runs tests, pushes to Artifact Registry, and can deploy to Cloud Run.