# Google Cloud Run vs Heroku

Canonical: https://inetgeek.com/compare/google-cloud-run-vs-heroku/

Every value below is read from Google Cloud Run's and Heroku's own documentation. See https://inetgeek.com/methodology/ for how.

## At a glance

| Criterion | Google Cloud Run | Heroku |
| --- | --- | --- |
| Pricing model | Metered by resource, billed in 100 ms increments, with no monthly minimum. Two billing settings change what is counted: request-based charges CPU only while a request is being processed, instance-based charges for the whole instance lifecycle. Prices vary by region — the location list is split into Tier 1 and Tier 2 pricing — and the free tier is applied as a spending-based discount at Tier 1 rates. | Usage-based on wall-clock time, prorated to the second |
| Max request duration | 5 minutes by default, extendable to 60 minutes per request. | 30 seconds (initial window for the web process to return response data) |
| Git deployment | Supported | Supported |
| Docker deployment | Supported | Supported |
| Containers | Supported | Supported |
| Persistent processes | Limited — instance-based billing keeps CPU allocated | Supported |
| Scales to zero | Supported | Limited |
| Autoscaling | Supported | Limited |
| Regions | 41 regions, counted from Cloud Run's own locations list — Google publishes the list rather than a total. They are split into Tier 1 and Tier 2 pricing, so the region chosen changes the bill as well as the latency. | 2 regions on the Common Runtime, which is what a standard dyno runs in: eu (Europe) and us (United States). A further 10 — Dublin, Frankfurt, London, Montreal, Mumbai, Oregon, Singapore, Sydney, Tokyo and Virginia — exist only in Private Spaces, an Enterprise product. |

## Where they differ

### Pricing model

- Google Cloud Run: Metered by resource, billed in 100 ms increments, with no monthly minimum. Two billing settings change what is counted: request-based charges CPU only while a request is being processed, instance-based charges for the whole instance lifecycle. Prices vary by region — the location list is split into Tier 1 and Tier 2 pricing — and the free tier is applied as a spending-based discount at Tier 1 rates. ([source](https://cloud.google.com/run/pricing))
- Heroku: Usage-based on wall-clock time, prorated to the second ([source](https://devcenter.heroku.com/articles/usage-and-billing))

### Max request duration

- Google Cloud Run: 5 minutes by default, extendable to 60 minutes per request. ([source](https://docs.cloud.google.com/run/docs/configuring/request-timeout))
- Heroku: 30 seconds (initial window for the web process to return response data) ([source](https://devcenter.heroku.com/articles/limits))

### Persistent processes

- Google Cloud Run: Limited — instance-based billing keeps CPU allocated ([source](https://docs.cloud.google.com/run/docs/configuring/billing-settings))
- Heroku: Supported ([source](https://devcenter.heroku.com/articles/dynos))

### Scales to zero

- Google Cloud Run: Supported ([source](https://docs.cloud.google.com/run/docs/about-instance-autoscaling))
- Heroku: Limited ([source](https://devcenter.heroku.com/articles/eco-dyno-hours))

### Autoscaling

- Google Cloud Run: Supported ([source](https://docs.cloud.google.com/run/docs/about-instance-autoscaling))
- Heroku: Limited ([source](https://devcenter.heroku.com/articles/scaling))

### Regions

- Google Cloud Run: 41 regions, counted from Cloud Run's own locations list — Google publishes the list rather than a total. They are split into Tier 1 and Tier 2 pricing, so the region chosen changes the bill as well as the latency. ([source](https://docs.cloud.google.com/run/docs/locations))
- Heroku: 2 regions on the Common Runtime, which is what a standard dyno runs in: eu (Europe) and us (United States). A further 10 — Dublin, Frankfurt, London, Montreal, Mumbai, Oregon, Singapore, Sydney, Tokyo and Virginia — exist only in Private Spaces, an Enterprise product. ([source](https://devcenter.heroku.com/articles/regions))

## Which should you choose?

Pick Google Cloud Run if A container you already build, that should cost nothing when nobody is using it. Scales to zero by default and back up on request volume, with a 60-minute ceiling per request that most request-driven platforms do not offer.

Pick Heroku if Teams that want to deploy by pushing to Git and let the platform handle the runtime, with Postgres, a scheduler and Docker deploys available on the same platform.

Consider something else: Google Cloud Run — You need a process that stays running between requests, or a disk that survives a deploy.

Consider something else: Heroku — The dyno filesystem is ephemeral, and a web process must respond within 30 seconds of receiving a request.

## Documented by only one

- Free tier: Google Cloud Run: Yes
- Entry paid plan: Heroku: $5 per month (Eco dynos plan, 1000 dyno hours shared across the account)
- When you exceed a cap: Heroku: Service sleeps: on the Eco plan ($5/month for a 1000 dyno-hour pool, the cheapest paid tier) exhausting the pool forces every Eco dyno on the account to sleep for the rest of the month, and extra hours cannot be bought
- Memory (entry plan): Heroku: 0.5 GB RAM on the Eco dyno ($5 flat/month, the cheapest paid dyno) and 0.5 GB on the Basic dyno ($7/month)
- Sites or apps included: Heroku: 100 apps per account, platform-wide on all plans (Heroku Team 100, Enterprise Team 200)
- File, inode or volume limit: Heroku: 1000 MB maximum compressed slug size, platform-wide on all plans; raisable via support ticket
- Concurrent builds: Heroku: 10 concurrent builds for verified users without an established payment history; 300 for verified users with one (platform-wide, all plans)
- Streaming response limit: Heroku: Platform-wide (router): 30 seconds to send the first byte, then a rolling 55-second idle window — if no data is sent for 55 seconds the connection is terminated
- Managed connection pooling: Heroku: Limited
- Scheduled jobs: Heroku: Supported
- Persistent storage: Heroku: Not supported
- Managed databases: Heroku: Supported
- Edge network: Google Cloud Run: Limited — deploy per region, add a load balancer
- SOC 2: Google Cloud Run: Covered under Google Cloud's core SOC 2 Type II reports, issued quarterly for Google Cloud and Google Workspace products generally.
- ISO 27001: Google Cloud Run: The Google Cloud Services ISMS holds an accredited ISO/IEC 27001 certification, audited by an independent third party.
- HIPAA: Google Cloud Run: Cloud Run is listed as a Covered Product under Google Cloud's HIPAA Business Associate Agreement.
- PCI DSS: Google Cloud Run: Cloud Run is listed among the individual Google Cloud products certified against PCI DSS via annual third-party audit.

## Questions this comparison answers

**Should I choose Google Cloud Run or Heroku?**

Pick Google Cloud Run if A container you already build, that should cost nothing when nobody is using it. Scales to zero by default and back up on request volume, with a 60-minute ceiling per request that most request-driven platforms do not offer.
Pick Heroku if Teams that want to deploy by pushing to Git and let the platform handle the runtime, with Postgres, a scheduler and Docker deploys available on the same platform.
