Our team runs a small API and a set of background workers for three different clients, one on each cloud. Each time a new service comes up, the same question returns: should it be a function, a Kubernetes deployment, or "just a container" on the managed platform? For most of our HTTP services the answer has become the managed container platform, but the three platforms differ more than their marketing suggests.
This post compares Google Cloud Run, Amazon ECS on AWS Fargate and Azure Container Apps on the points that drove real decisions: how they scale, how they bill, how they reach private networks, and how deploys work. Our previous post compared the function platforms; this one is about containers you build yourself.
The one-line summary
Cloud Run: request-driven container platform, scales to zero, bills per request time by default, many requests per instance.
ECS on Fargate: task-driven, runs the number of tasks you ask for, bills while tasks run, no built-in HTTP front end (you add a load balancer).
Azure Container Apps: built on Kubernetes with KEDA-based scaling, scales to zero, has an HTTP ingress included, offers both consumption and dedicated workload profiles.
Scaling and scale-to-zero
Cloud Run | ECS on Fargate | Azure Container Apps | |
|---|---|---|---|
Scale to zero | Yes (default min instances 0) | No in practice; desired count 0 means no service | Yes (min replicas 0) |
Scaling signal | Concurrent requests and CPU | Service Auto Scaling: CPU, memory, ALB requests per target, custom metrics | KEDA scalers: HTTP concurrency, queues, Kafka, cron, custom |
Time to add capacity | Seconds | Tens of seconds to a few minutes (task start, health checks) | Seconds to tens of seconds |
Concurrency per instance | Configurable, default 80, up to 1,000 | Whatever your app handles | Whatever your app handles; HTTP scale rule sets the target |
Scale-to-zero is a cost feature for low-traffic services and a latency risk for user-facing ones: the first request after idle waits for a container start. On Cloud Run and Container Apps we set a minimum of one instance for anything a user waits on, and zero for internal tools and preview environments.
ECS can scale a service down to zero tasks, but nothing starts a task when a request arrives, so it is not "scale to zero" in the serverless sense. Teams that need it on AWS often use App Runner or Lambda instead, or accept a small always-on cost.
Container Apps' KEDA integration is its strongest scaling feature: a worker can scale on Service Bus queue length, Kafka lag or a cron schedule with a few lines of configuration. On ECS, the same requires a custom CloudWatch metric and a target tracking policy. On Cloud Run, worker-style scaling on queue depth is less natural; push subscriptions turn messages into requests instead.
Billing models
Cloud Run | ECS on Fargate | Azure Container Apps (consumption) | |
|---|---|---|---|
What you pay for | vCPU-seconds and GiB-seconds; by default only while handling requests | vCPU and GB per second for each running task, from image pull until task stops, 1-minute minimum | vCPU-seconds and GiB-seconds while replicas run; lower rate for idle replicas |
Request charge | Per million requests (request-based billing) | None (load balancer billed separately) | Per million HTTP requests |
Always-on option | Instance-based billing (CPU always allocated), cheaper per second | The default | Dedicated workload profiles billed per node |
Discounts | Committed use discounts | Compute Savings Plans, Fargate Spot | Savings plan for compute |
Free allowance | Monthly free tier | None for Fargate | Monthly free grant per subscription |
Two choices change Cloud Run bills a lot:
Request-based billing (the default) charges only while requests are processed. CPU outside a request is throttled, so background threads after the response do not get CPU time.
Instance-based billing keeps CPU allocated for the whole instance lifetime and charges for all of it, at a lower unit price. It is the right choice for steady traffic and for any code that works after the response is sent.
On Fargate the bill is predictable: tasks times size times hours. Fargate Spot cuts the price substantially for interruptible workers, with a two-minute warning before a task is stopped.
Container Apps on the consumption plan bills an idle replica (one that is running but using almost no CPU and receiving no requests) at a reduced rate, which makes a minimum replica of one cheaper than the same always-on container on Fargate.
A rough example from our clients, for one API at about 30 requests per second during business hours and near zero at night: the Cloud Run service with request-based billing cost about 40 percent less than two always-on Fargate tasks of the same size, mainly because of the nights and weekends. For a steady 24/7 workload the gap closed and Fargate with a Savings Plan was cheaper.
Networking
Cloud Run | ECS on Fargate | Azure Container Apps | |
|---|---|---|---|
Public HTTPS endpoint | Built in ( | Add an ALB or NLB, or API Gateway | Built-in ingress, custom domains |
Private-only service | Ingress set to internal, or internal load balancer | Internal ALB in private subnets | Internal environment (VNet-integrated) |
Reach private resources | Direct VPC egress or Serverless VPC Access connector | Native: each task gets an ENI in your subnets ( | Environment deployed into your VNet subnet |
Service-to-service | HTTPS with IAM-authenticated calls | Service Connect or Cloud Map | Built-in internal DNS between apps in an environment |
Fargate has the most "normal" networking: a task is just an IP in your VPC subnet with its own security group. That makes it the easiest choice when the service must sit next to existing databases with strict network rules. It also means each task consumes a subnet IP; plan subnet sizes for peak scale.
Cloud Run started outside your VPC and reaches into it. Direct VPC egress (generally available since 2024) sends traffic from instances straight into a subnet without a connector, which is faster and cheaper than the older Serverless VPC Access connector. Plan the subnet size for it as well, since instances take IPs from that range.
Container Apps put the whole environment into a subnet of your VNet. Choose the subnet size carefully at creation; changing the environment's network later means recreating it.
Deploys and revisions
All three support rolling out a new version gradually:
Cloud Run creates an immutable revision per deploy and can split traffic by percentage or give a revision its own tagged URL for testing before it receives traffic.
ECS uses rolling updates by default, with deployment circuit breaker to roll back failed deploys automatically. ECS added native blue/green deployments in 2025; before that, blue/green required CodeDeploy.
Container Apps creates revisions and, in multiple-revision mode, splits traffic between them by percentage with labels for direct access.
Health checks deserve care on every platform. On ECS, the load balancer's health check and the container health check both decide whether a task stays; a slow-starting app needs a healthCheckGracePeriodSeconds. Our post on ECS Fargate health check failures (post 296) covers that in detail. On Cloud Run, configure a startup probe for slow-starting containers so traffic is not sent too early.
When we pick each
Situation | Our pick |
|---|---|
HTTP API with spiky or business-hours traffic | Cloud Run or Container Apps |
Service tightly coupled to VPC resources on AWS | ECS on Fargate |
Background workers scaling on queue or Kafka lag | Container Apps (KEDA), or ECS with target tracking on AWS |
Steady 24/7 load on AWS with a Savings Plan | ECS on Fargate |
Many small internal tools, mostly idle | Cloud Run or Container Apps with min instances 0 |
Need Kubernetes features (CRDs, operators, sidecars beyond basics) | Managed Kubernetes instead (GKE, EKS, AKS) |
Common mistakes
Mistake | Why it hurts | Do this instead |
|---|---|---|
Background work after the response on Cloud Run request billing | CPU is throttled; work stalls or is lost | Use instance-based billing or push work to a queue |
Small subnets for Fargate or Cloud Run Direct VPC egress | Scaling stops when IPs run out | Size subnets for peak instances |
Scale-to-zero for user-facing APIs | First request after idle is slow | Minimum one instance for latency-sensitive services |
No grace period on ECS health checks | Tasks killed during startup, deploy loops | Set a grace period longer than startup time |
Picking by list price only | Billing model and traffic shape decide cost | Model your real traffic per platform |
Key takeaways
Cloud Run and Container Apps scale to zero and bill mostly for use; Fargate bills for running tasks.
Concurrency per instance and billing mode decide Cloud Run costs.
Fargate gives the simplest VPC networking; the others integrate into your network with a subnet.
Container Apps' KEDA scaling is the easiest route for queue-driven workers.
For complex orchestration needs, move to managed Kubernetes instead of stretching these platforms.
References
Google Cloud: Cloud Run billing settings — https://cloud.google.com/run/docs/configuring/billing-settings
Google Cloud: Direct VPC egress with a VPC network — https://cloud.google.com/run/docs/configuring/vpc-direct-vpc
AWS: Amazon ECS on AWS Fargate — https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html
AWS: AWS Fargate pricing — https://aws.amazon.com/fargate/pricing/
Microsoft: Scaling in Azure Container Apps — https://learn.microsoft.com/en-us/azure/container-apps/scale-app
Microsoft: Billing in Azure Container Apps — https://learn.microsoft.com/en-us/azure/container-apps/billing
Comments
0No comments yet. Be the first to comment!
Sign In to post a comment.