Google Cloud Run - Monthly Pricing Breakdown (2024)
Date: 2024-01-10 | create | tech | cloud | google-cloud | cloud-run |
I've been using Google Cloud Run to host my apps for years - I even use it to host this site for ~$1 / month.
One recurring annoyance I've found is trying to make sense of the Google Cloud Run pricing page. It seems almost intentionally confusing by putting a bunch of a la carte prices in per second, per resource, tier conditional pricing combos that makes it very hard to see how much you'd actually be paying for something.
So I finally did the math to convert Google Cloud Run prices into monthly sums so that it's easier to see how much you'd actually pay and to compare that price against similar service offerings.
How Google Cloud Run pricing works
Cloud Run is a managed container service (Platform as a Service) that runs your code in a container on a server managed by Google. You then pay for the server resources used while running your container.
You can configure a bunch of things about how Cloud Run runs your container including the size and amount of servers to run as well as when these servers should be spun up.
In particular there are two CPU allocation types you can configure which tells Cloud Run when to run your code on servers:
- Always Allocated - A server is always running your code
- On-Demand - A server is only running your code when a request comes in
All of this feeds into pricing. At the end of the month, all of the server resources you use are tallied up and billed to you.
Google Cloud Run Pricing
Google Cloud Run prices depend on several things, primarily:
- Cloud Run Allocation Types
- The size of the server (in vCPU and Memory)
- Where your server is running (regional price tiers)
I'm going to pull out key pricing information from the Cloud Run pricing page that we'll use later. This will make it easier to see where the numbers come from and serve as a snapshot in case these prices change in the future.
Google Cloud Run - Tier 1 Pricing
Tier 1 Pricing
- Always Allocated
- CPU: $0.00001800 / vCPU-second
- Memory: $0.00000200 / GiB-second
- On-demand
- CPU: $0.00002400 / vCPU-second
- Memory: $0.00000250 / GiB-second
Google Cloud Run - Tier 2 Pricing
Tier 2 Pricing
- Always Allocated:
- CPU: $0.00002160 / vCPU-second
- Memory: $0.00000240 / GiB-second
- On-Demand
- CPU: $0.00003360 / vCPU-second
- Memory: $0.00000350 / GiB-second
A few callouts:
- Tier 1 is cheaper than Tier 2 (you can find the full region to pricing tier list on the Cloud Run pricing page)
- Always Allocated is cheaper than On-Demand per second, though if you have an app that gets few requests or is spikey On-Demand may end up cheaper overall
Google Cloud Run pricing per month
Here we'll crunch the numbers to get monthly Cloud Run prices. We are going to make some assumptions to simplify a few things to make this calculation easier to understand and more realistic for most usecases:
- Free tier doesn't exist (you'll exceed free tier with a simple app anyway so all future services will be full price)
- Requests and transfer payloads are free (assume this price is the baseline and it could cost more)
- You're using the server for the full month (this is easier to compare and more closely aligns with how other platforms do pricing)
- A month is ~2,600,000 seconds (about 30.5 days)
1 vCPU, 0.5 GB RAM
Always Allocated:
- $49.40 (Tier 1)
- $59.28 (Tier 2)
On-demand:
- $65.65 (Tier 1)
- $91.91 (Tier 2)
1 vCPU, 1 GB RAM
Always Allocated:
- $52.00 (Tier 1)
- $62.40 (Tier 2)
On-demand:
- $68.90 (Tier 1)
- $96.46 (Tier 2)
1 vCPU, 2 GB RAM
Always Allocated:
- $57.20 (Tier 1)
- $68.64 (Tier 2)
On-Demand:
- $75.40 (Tier 1)
- $105.56 (Tier 2)
2 vCPU, 2GB RAM
Always Allocated:
- $114.40 (Tier 1)
- $137.28 (Tier 2)
On-Demand:
- $150.80 (Tier 1)
- $211.12 (Tier 2)
Next
Honestly doing the math and seeing the pricing results rolled up by month was surprising. I've personally never paid that much for Cloud Run hosting because my side projects tend to be small with low traffic so are mostly covered by the free tier.
But it seems if you get enough traffic to require an always-on server the pricing dynamic changes quite a bit, especially compared to some of the smaller players out there.
If you liked this post you might also like:
Want more like this?
The best / easiest way to support my work is by subscribing for future updates and sharing with your network.