Comparing Managed Postgres Pricing for Side Projects - GCP CloudSQL vs DO Managed DB

Date: 2024-01-24 | create | tech | cloud | google-cloud | digital-ocean |

I've been exploring various cloud hosting options recently to decide how best to host my side projects to optimize for simplicity and cost. I've found GCP Cloud Run to work well for low-traffic, mostly-static sites (I hosted this site on Cloud Run for ~$1 per month in 2023) but for more intensive apps that have higher load and data persistence, Cloud Run can get quite costly.

I previously compared the price of managed container (PaaS) offerings on Google Cloud and Digital Ocean and found DO to be much cheaper so in this post we'll compare their managed database offerings - GCP's CloudSQL Postgres and Digital Ocean's Managed DB Postgres.

Managed Postgres Databases

I'm a big fan of managed databases (and managed PaaS infra in general) as it removes a lot of the manual overhead involved with setting up and maintaining a server. This is generally more expensive than running your own server but I think the time / headspace you get back is usually worth it.

Postgres is my DB of choice as it scores well across ease-of-use, performance, and reliability making it a solid choice for most applications.

Both GCP and Digital Ocean offer managed Postgres instances so that's what we'll be comparing here. Yes they also offer others like MySQL, Redis, etc but that's out of scope for this post.

Managed Postgres Pricing

We'll be comparing prices as displayed at time of writing (2024.01.12). To compare, we're picking the lowest tier of managed Postgres machines available on each platform as these are most suitable for smaller projects (and the most likely ones I'd choose for my new projects)

Digital Ocean

DO's lowest tier machines are Basic Regular Droplets which run on shared vCPUs with SSD disks. They have a finite number of configurations to choose from. DO Pricing at time of writing:

Digital Ocean - Managed Postgres Pricing

Digital Ocean - Managed Postgres Pricing

Google Cloud Platform

GCP has a ton of configuration options but here we'll be looking at Enterprise Edition machines in us-east1. GCP offers more configuration options between vCPU x RAM x Storage so we'll be limiting the ones we compare to those available on DO to make this simpler.

Google Cloud - Managed Postgres Pricing

Google Cloud - Managed Postgres Pricing

Note that these are "dedicated" vCPUs but this doesn't necessarily mean they're not on shared machines as vCPU implementations vary.

Comparing DO vs GCP Pricing

Here we'll calculate and compare the monthly pricing for ~similar managed Postgres db offerings from Digital Ocean and Google Cloud Platform.

Managed Postgres - Digital Ocean vs Google Cloud

Managed Postgres - Digital Ocean vs Google Cloud

On the low end (1 vCPU, 1 GB RAM, 10 GB storage) DO ($15) beats out GCP ($37) pricing by about 60%. On the higher end (6 vCPU, 16 GB RAM, 580 GB Storage), pricing gets closer with DO ($298) beating GCP ($361) by about 18%.

So for smaller DBs DO seems like a more attractive choice but for larger options the prices seem to converge.

1 vCPU, 1 GB RAM

10 GB Storage:

  • DO - $15
  • GCP - $37

30 GB Storage:

  • DO - $19
  • GCP - $40

1 vCPU, 2 GB RAM

30 GB Storage:

  • DO - $30
  • GCP - $45

50 GB Storage:

  • DO - $34
  • GCP - $49

2 vCPU, 4 GB RAM

60 GB Storage

  • DO - $60
  • GCP - $91

120 GB Storage

  • DO - $72
  • GCP - $101

4 vCPU, 8 GB RAM

140 GB Storage

  • DO - $120
  • GCP - $185

280 GB Storage

  • DO - $148
  • GCP - $209

6 vCPU , 16 GB RAM

290 GB Storage

  • DO - $240
  • GCP - $312

580 GB Storage

  • DO - $298
  • GCP - $361

Next

I've enjoyed using GCP for my projects over the last few years but after taking a look at other offerings I think DO might make more sense for me for my small side projects where simplicity and cost are more important than scale. Plus it seems like scaling up is feasible performance / price wise and there's always the option to migrate should the need arise so there's not much of a downside in trying it out.

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.