Cloud Run vs Fargate
Serverless containers.
Overview
Cloud Run and Fargate are both serverless container runtimes, but the operational shape is different. Cloud Run scales to zero by default and bills per-request; Fargate runs tasks as long-lived ECS or EKS units and bills per vCPU-second. Pick on cold-start tolerance, cloud gravity, and concurrency model first.
- Cloud Run. Scale-to-zero, request-billed, fast cold start, built-in HTTPS endpoint, native concurrency-per-instance setting.
- Fargate. Always-on tasks (no scale to zero on plain ECS), VPC-native, deep IAM and Secrets Manager integration, fits multi-AZ ECS or EKS topologies.
- Operational fit. Cloud Run wins for spiky HTTP workloads with cost-to-zero requirements; Fargate wins inside an existing AWS estate where IAM and VPC peering already exist.
- Per-workload decision and exit cost. Both accept OCI images, so the lock-in is in glue (IAM, networking, observability) rather than the container itself.
The approach
Match the runtime to the workload's traffic shape, the team's existing cloud, and the latency the customer can tolerate on a cold start.
- Traffic-shape classification. Spiky and zero-floor traffic leans Cloud Run; steady traffic where every second of vCPU is metered leans Fargate.
- Cloud-gravity check. If your VPC, secrets, and IAM are already in AWS, Fargate removes a cross-cloud connectivity tax.
- Cold-start budget. Cloud Run min-instances costs money but eliminates cold start; Fargate avoids cold start by being always-on.
- Document the choice and the trigger to revisit. Capture the rationale and the metric (RPS, cost, latency) that would flip the decision.
Why this compounds
Container runtime choice compounds because deploy pipelines, observability adapters, and IAM patterns all anchor on the runtime. Each new service that picks the same runtime inherits the operational surface for free.
- Operational consolidation. Fewer runtimes mean fewer deploy templates, fewer log shippers, fewer failure modes for on-call to recognise.
- Cost predictability. A documented choice keeps surprise bills out of the next quarter and gives finance a model to forecast.
- Faster onboarding. One runtime per cloud removes ramp time for new services.
- Decision trail for the next service. Each documented choice teaches the next team which questions to ask, not which runtime to default to.