GCP Cloud Run vs AWS Fargate for Bursty Workloads: A Cost and Cold-Start Breakdown
We ran the same containerized API on Cloud Run and Fargate for six months. Here's what the bills, cold starts, and scaling behavior actually looked like when traffic went sideways.
We had a client API that sat near-idle for 18 hours a day, then took 40x traffic for a four-hour window tied to a daily partner batch. Classic bursty workload, classic "should we pick Cloud Run or Fargate?" argument. We ended up running both in parallel for six months before consolidating, and the answer wasn't the one we expected going in.
This isn't a feature-matrix post. Both services can run a container. The interesting questions are what happens at the edges: when traffic goes from 0 to 2,000 RPS in 90 seconds, when a deploy ships during a spike, and when the finance team asks why the bill tripled.
The workload we were testing
The service was a Node.js 20 API, ~180MB container image after optimization, backed by Postgres (Cloud SQL on one side, RDS on the other). P50 response time around 80ms, P99 around 400ms when warm. Traffic pattern:
- 0600–1000 UTC: effectively zero (maybe 1–2 RPS from health checks and stragglers)
- 1000–1400 UTC: sustained 800–2,000 RPS with spikes to ~3,500
- Rest of the day: 20–100 RPS, mostly dashboard traffic
So: scale-to-zero is tempting, but cold starts during the ramp would be user-visible. We cared about three things: cost per million requests at this profile, cold start behavior during the ramp, and operational overhead of the surrounding infrastructure (networking, secrets, deploys).
What "the same container" actually meant
We used an identical multi-stage Dockerfile and pushed to both Artifact Registry and ECR. Same image digest, same env vars where possible, same minimum/maximum instance settings tuned per platform.
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY . .
RUN npm run build
FROM node:20-alpine
WORKDIR /app
COPY --from=build /app/dist ./dist
COPY --from=build /app/node_modules ./node_modules
ENV NODE_ENV=production PORT=8080
EXPOSE 8080
CMD ["node", "dist/server.js"]
One caveat: Cloud Run and Fargate have different concurrency models. Cloud Run defaults to 80 concurrent requests per instance; Fargate (behind an ALB) effectively has whatever concurrency your app process can handle, and you scale by task count. We tuned Cloud Run concurrency to 60 after load testing and ran Fargate tasks at 0.5 vCPU / 1GB with target tracking at 70% CPU.
Cold starts: the part everyone obsesses over
In our testing, Cloud Run cold starts for this image landed in the 900ms–1.6s range for the first request, with subsequent requests to a new instance warming in ~200ms once the Node process was serving. That's with min-instances=0.
Fargate cold starts — meaning time from task launch to healthy behind the ALB — were brutal by comparison: 35–75 seconds in our environment. That number includes ECR pull, task start, container start, and ALB health check passing. You can trim it with image caching, smaller images, and aggressive health check thresholds, but you're not getting to one-second territory.
The tradeoff is obvious once you internalize it:
- Cloud Run scales to zero and absorbs a burst in seconds, with a short tail of slow first requests.
- Fargate scales to zero in theory, but if you do that, the first users of the morning wait a minute. In practice you run minimum tasks.
What we actually did about it
For the Cloud Run deployment we set min-instances=2 during the ramp window using a Cloud Scheduler job that patched the service config at 0945 UTC and reverted at 1430 UTC. That gave us warm capacity ahead of the batch without paying for idle instances overnight.
For Fargate we kept a baseline of 2 tasks always running and relied on target tracking scaling for the burst. Scaling response time from the first CloudWatch alarm to new tasks serving was 2–4 minutes in our tests, which meant we had to pre-scale via a scheduled scaling action to avoid 5xx during the initial ramp.
Cost: what the invoice actually said
This is where it gets interesting, and where every blog post you've read lies to you a little. The sticker price per vCPU-second favors Cloud Run for spiky workloads because you're billed for request-handling time, not instance uptime (unless you opt into CPU-always-on). But "per million requests" numbers depend heavily on your request duration and memory footprint.
Our monthly totals, averaged across the test period, for roughly 180M requests/month:
- Cloud Run: compute billing in the range of $340–$420/month, plus egress and Cloud SQL (separate line item).
- Fargate: compute billing in the range of $610–$780/month for the task-hours we ran, before NAT and ALB costs.
The Cloud Run number is lower partly because of the request-based billing during idle hours and partly because we weren't paying for the baseline 2 tasks that Fargate needed for cold-start insurance. If we'd been able to run Fargate truly at scale-to-zero, the gap would narrow — but we couldn't, because of the cold-start problem above.
The hidden costs people forget
A few line items that don't show up in most comparisons:
- NAT Gateway on AWS: if your Fargate tasks need to reach the public internet (third-party APIs, webhooks) and you're in private subnets, you're paying NAT per-GB. We've written about how that bill sneaks up on you before.
- ALB vs Cloud Run's built-in HTTPS: Fargate behind an ALB costs you ~$16/month minimum for the ALB itself plus LCU charges. Cloud Run bundles the load balancer.
- VPC connector on Cloud Run: if you need to reach private resources (Cloud SQL via private IP, internal services), the Serverless VPC Access connector has its own instance cost. Not huge, but not zero.
- Egress: GCP egress pricing and AWS egress pricing are both painful and both worth modeling separately. Don't skip this step.
Operational overhead
Deploys were simpler on Cloud Run. gcloud run deploy with a new image tag, traffic shifts gradually if you configure it, and rollback is a traffic reallocation. We ship from GitHub Actions in both environments.
Fargate deploys via ECS rolling updates were slower (new task set, drain old, wait for health checks) and more fiddly when a deploy landed mid-burst. We had one incident where an ECS deploy during the ramp window caused capacity to dip below demand because the deployment controller was draining old tasks while new ones were still coming up. We now block deploys during the ramp window via a merge queue rule.
Networking is where AWS wins
If your workload needs to sit inside a complex VPC with peering, Transit Gateway, PrivateLink to specific vendors, or strict egress rules, Fargate slots into that world naturally. Cloud Run's networking model is improving, but if you're deep into AWS networking primitives, moving to Cloud Run means re-architecting how your service reaches everything else.
For this particular API, networking was simple: Postgres, Redis, two third-party HTTPS APIs. Either platform handled it fine.
Observability
Both platforms ship logs and basic metrics by default. For anything real we ran OpenTelemetry with the collector running as a sidecar pattern on Fargate (actual sidecar container in the task definition) and as a separate Cloud Run service receiving OTLP from the main service on Cloud Run. Sentry caught the application errors in both.
One thing to flag: Cloud Run's per-request CPU allocation (the default) means background work after sending the response gets throttled. If you're doing async work post-response — logging flushes, OTel batch exports, cleanup — either enable CPU always-on or restructure. We got bitten by dropped telemetry on Cloud Run before we figured this out.
When we'd pick each one
After running both, here's our honest take:
Pick Cloud Run when: you have truly spiky or scale-to-zero-friendly traffic, your networking requirements are modest, your team is comfortable with GCP, and cold starts in the 1-second range are acceptable (or you can pre-warm with min-instances during known windows).
Pick Fargate when: you're already deep in AWS, you need tight VPC integration, your traffic has a predictable baseline that makes task-hour billing reasonable, or you need the control that comes with ECS task definitions (sidecars, specific IAM task roles per service, EFS mounts, etc.).
We wouldn't pick Fargate for a workload that genuinely wants to scale to zero. We wouldn't pick Cloud Run for a service that needs to live inside a complicated AWS VPC.
Where we'd start
If you're facing this decision right now: run a one-week shadow deployment of your real workload on whichever platform you're not currently using. Mirror a slice of production traffic, or replay a day of logs. Measure cold starts on your actual image, not the hello-world container every benchmark uses. Price the full stack — compute, networking, load balancer, egress — not just the per-vCPU-second number on the pricing page.
Then make the decision based on your numbers, not ours. If you want a hand setting up that comparison properly, that's the kind of thing we do.
Want a team like ours?
72Technologies builds production software for the kind of teams who actually read this blog.
Start a projectKeep reading
Vercel Edge Middleware Hit 1MB: How We Cut It Back Under the Limit
Our Vercel middleware bundle quietly ballooned past the 1MB edge limit and broke a Friday deploy. Here's what was actually in it, what we ripped out, and the patterns we now enforce in CI.
Pulumi vs Terraform in 2026: A Migration Postmortem
We moved a mid-sized AWS estate from Terraform to Pulumi, then moved part of it back. Here's what the migration actually cost, where Pulumi earned its keep, and where HCL still wins.
Sentry Performance Quotas Blew Up Our Budget: How We Tamed Transaction Volume
We burned through a year of Sentry performance quota in six weeks. Here's what actually caused it, what the dashboards didn't show us, and the sampling rules that brought the bill back under control.
