Build and push your container image to Artifact Registry (preferred) or Container Registry; ensure the image listens on the PORT environment variable (Cloud Run injects this, default 8080)
Deploy with gcloud run deploy specifying --concurrency (requests per container instance, up to 1000), --min-instances to keep warm instances alive and eliminate cold starts for latency-sensitive services, and --max-instances to cap cost
Set --cpu and --memory according to your workload; note that CPU is throttled to near-zero between requests unless you pass --no-cpu-throttling (which keeps CPU allocated during idle — incurs cost)
Use --execution-environment=gen2 for workloads needing full Linux compatibility or higher networking performance; gen2 also reduces cold-start frequency
Configure startup and liveness probes via the service YAML (httpGet or tcpSocket) so Cloud Run can distinguish a slow start from a crashed container; set initialDelaySeconds to match your application boot time
Set environment variables and secrets via --set-env-vars or --set-secrets (binds Secret Manager secrets at deploy time); avoid baking credentials into the image
Known gotchas
With --min-instances 0 (the default), every scale-from-zero event incurs a cold start that includes container pull, runtime init, and application init — for JVM or Python apps this can be several seconds; use --min-instances 1 or more for latency-critical paths
CPU is only allocated during request processing by default; background goroutines, timers, or async tasks that run after the response is sent may be preempted or produce unpredictable behavior unless you enable --no-cpu-throttling
Container images larger than ~500 MiB significantly worsen cold-start times; use multi-stage builds and distroless or slim base images
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp