Essay - Published: 2024.01.09 | business | cloud-run | create | fsharp | google-cloud | serverless-containers | tech |
DISCLOSURE: If you buy through affiliate links, I may earn a small commission. (disclosures)
I recently migrated my sites from SvelteKit to F# and did a review of how much money my projects made vs how much they cost.
In this post I wanted to dive into how much it costs me to run this site on Google Cloud.
My site is mostly static content using server-side rendered HTML built with F# and Giraffe.ViewEngine. This means it doesn't really do that much work and doesn't need that much infrastructure - really just a server it can run on and will accept connections.
For an idea of scale, my sites get approximately 50k views a year which comes out to about 0.002 requests / second which is quite small in software terms. Yes this traffic isn't continuous so has regular spikes / dips but we can assume it's still pretty small.
I run my site on Google Cloud Run which is a serverless managed container service on GCP. It works by spinning up a container image of my site when a request comes in. That container is kept running to serve subsequent requests and then goes to sleep after a few minutes if no more requests come in.
I like this because:
I find this gives me a nice balance of ease of use, high scalability, and low cost - a Simple Scalable System if you will.

Hosting my site in 2023 cost me about $6.70 ($0.56 per month).
Note though that this is the price that I actually paid but includes discounts like credits / free tier. I find that most clouds use this to try and make it seem cheaper than it is so I wanted to also share how much it would've cost if those discounts weren't there to better model what this would cost at scale / for average builder.

Without discounts, my site costs would've been $10.36 for the year ($0.87 per month).
Not bad but still a good 50% more expensive.
Overall I've had a really good experience with Google Cloud Run. I've been using them for years to host my own side projects and would recommend them for others as well. I'm not totally sure how it would work at scale (with a site / service that gets a lot of traffic) as I've never done that myself and I can see how costs could go up dramatically if it never scaled to zero but for my purposes it works well and costs little for the value I get out of it.
I'll probably be exploring some other hosting options this year as I play around with building more projects so stay tuned if you're interested in that.
If you liked this video you might also like:
The best way to support my work is to like / comment / share for the algorithm and subscribe for future updates.