Over the last few months I've been using GCP for a toy project. The goal has been to play around with some code, as well as poke around the GCP ecosystem to get a feel for it. All the resources I am using are configured to be as small as possible, and as a result I generally manage to keep my bill to under $20. Today however, I got a warning from GCP that my tiny bill had increased significantly on a percentage basis. What happened? It turns out that even a toy instance of PostgreSQL is rather pricey compared to other cloud providers. The instance I was running was configured to 2 VCPUs, with some ram and disk to match. That on its own was enough to quadruple my monthly bill. Since I was using such limited resources, I hadn't checked the price ahead of time, so the relative expense compared to other resource types, surprised me.
As a result, I decided to check out what other cloud providers are charging for a small instance of PostgreSQL. Are databases inherently expensive? To keep things somewhat fair when comparison shopping, I decided to keep to the smallest possible instance for each provider, with roughly 1vCPU, 1 GB of memory and 10 GB of SSD. Egress costs, replication, cross zone deployments and backups are ignored for this comparison as they are not relevant for most "toy projects".
Provider | Monthly Price | vCPU | Mem GB | Storage GB | Notes |
---|---|---|---|---|---|
$39.561 | 1 | 1 | 10 | ||
Azure | $25.82 | 1 | 2 | 10 | |
Digital Ocean | $15.00 | 1 | 1 | 10 | |
AWS | $11.688 | 2 | 1 | 10 | Burstable CPU |
AWS seems to have the best price out of the common US cloud providers, beating the competition not only on price, but also on included features. Google Cloud seems to be more than three times as expensive for an arguably worse setup. Unfortunately, it doesn't seem to get any cheaper as the instance sizes increase.
I find myself wanting to love GCP, at least for personal projects. I don't like the monoculture that seems to have developed around AWS. However, Google makes itself hard to recommend in this one instance. I suspect that AWS is losing money on their micro instance in the short term. However, they are probably making a calculated trade off. The micro instance is the type of instance that tends to get spun up by the poor college student who is working on their first project. It is also the type of instance that gets expanded into a full fleet deployment later on when the college student joins the workforce. The workforce where everyone is familiar with AWS offerings and considers it the default option...