Postgres on Fly.io is now free for small projects. The hard part about free Postgres is storage, so this post is also about free storage. Read about it here, or try us out first. You can be up and running in just a few minutes.
We like building side projects and also hate paying for hosting for side projects. We also know that y'all like free stuff. And we think that when you use free stuff for side projects, there’s a pretty good chance you’ll pay for similar stuff for real work.
We’ve had a free tier since we launched ten years ago (in 2020). Until today, our free tier covered a little bit of CPU time, a little bit of RAM, and a little bit of bandwidth. We didn’t include storage.
There’s a good reason for this. CPU, RAM, and bandwidth are easy. It costs almost nothing to keep a process idling. It’s easy to migrate application processes. And, importantly, it’s easy to bounce back when hardware goes poof. These things are easy because there’s almost no state involved. An application process that stops and starts fresh on different hardware continues to be valuable.
Your enormous database of sandwiches is different, though.
Stored data occupies space all the time, though, whether your app is running or not. Recovering data from hardware failure means you have to be storing it with some redundancy. You need replication and backups. This means more disk space, but it also means more management. Disks are not easy!
But how boring are apps with no state? You could store some sandwiches right in your app, but you’d have to deploy it again every time an ingredient changed. And you wouldn’t remember who’d ordered from you before, let alone what their favorite condiments are. The best apps save data, and the best-best apps keep track of it in a database so it’s easy to remix and share: what better way to let your customers create a poll for the office lunch order?
What IS free Postgres?
“Free Postgres” really means we’ve added 3GB of persistent volume space to our free offering. Specifically, you’re getting LVM block devices as small as 1GB. Match that up with our free VM and RAM allowance, and you’ve got what you need for a side-project Postgres setup.
The free VMs themselves are just a bit of memory and some idling CPU, but the state is obnoxious for us to manage.
We’ve done the work to sort out some of the management headaches with our baked-in Postgres. “Production” deployments set up 2-node Postgres clusters intentionally. They should have higher availability than a single node, and they have data redundancy. When you run HA Postgres, you’re getting data storage on two isolated NVMe drives. We also take snapshots of these volumes, to give your delicious data some buffer against mishap.
Free Postgres would start with a single “Development” node, but if you scale it, it seamlessly becomes a leader-replica cluster for high availability.
So…we’re really giving you free volumes
The lede is “free Postgres” because that’s what matters to full stack apps. You don’t have to use these for Postgres. If SQLite is more your jam, mount up to 3GB of volumes and use “free SQLite.” Yeah, we’re probably underselling that.
A note about credit cards
Even for our free services, we require a credit card number. We know that’s the worst and it gives you heartburn. It’s not because we plan to charge you.
But here’s what happens if you give people freemium full access to a hosting platform: lots and lots of free VMs mining for cryptocurrencies.
We could tell you we want to prevent crypto mining because we care about the planet, and that would be true. We also have a capitalism nerve that hurts when people spend our money gambling. Your credit card number is the thin plastic line between us and chaos.