I thought I’d start a thread for readers who’re working on a side-project that will, one day, take over the world. You might need a relational database, and despite the economies-of-scale promises of the cloud, most things don’t seem to fit for broke hobbyists.
So this is for you if your project permanently has precisely one user (two if you include your lazy dog,
and I’m pretty sure she didn’t create an account).
Hosted
To start with, have a peek on Free For Dev, an awesome stack of curated engineering resources. The only small caution I might apply is that offering services for free costs someone some money, so we probably should approach the list intending to cough up some cash eventually.
I have a side project currently running on the free tier of Supabase Postgres; it’s reliable, I am using both of my free database slots, one of them goes to sleep every two weeks, and I click a thing to wake it up. That’s in dev, so a bit of downtime is OK.
I have a separate solo project that is probably more likely to see the light of day, and for that I presently need MySQL. I am minded to try filess.io first. Hailing from Spain, the UI is fine, and I created a small 10MB database without fuss. I liked that they create resources in Europe, but it was less good that I could not decide where the resources are created. Their online reviews are a mixed bag, and their lack of social media activity makes me wonder if this is in itself a side-project. (I like side-projects, but infrastructure probably should not itself be a side-project
).
PlanetScale looks interesting, and they have a 5USD tier, but it’s Postgres only. To be fair, I’ve enough integration tests that I could probably switch to that… For completeness I’ll mention these folks do have a MySQL tier, but it looks posh and expensive.
I’ll add a note for Layerbase; I might try them too. They’ve a free 5GB tier that sleeps if necessary and insta-wakes, and weirdly you can have MariaDB but not MySQL. However they have a 5USD tier where MySQL is a permitted choice. The data storage is US-only, but perhaps distributed systems fans can work around that with on-container caching.
Finally, Neon looks like it has a free tier, with databases limited to 0.5G in size. Postgres-only, like Supabase. If you upgrade though the costs are usage-based; that can be good or bad depending on how you look at it.
Self-hosted
Whilst writing up this list, I’ve pondered two more options. I offer these with the observation that precarious one-node unmanaged clusters gets a weekly mention
in this very sub, and a few of us are minded to bop offenders on the head with an extremely bristly broom.
However, I do think it can be OK if the operator is mindful of the risks.
My first approach is to find a bare-metal traditional VPS company.† I can give a UK recommendation if anyone fancies it; they’re not really competing with Fly, as they have a very different product. I’d wager MySQL would run on, say, a 1GB RAM instance for months before needing a hypervisor reboot. Of course, configure hourly and weekly backups, and make sure they are rsynced to another place frequently. Often you can get away with a IPv6-only machine, which should be a bit cheaper.
The other approach is to use Fly, and to run a cluster in a simple configuration. Rather than quorum cluster systems, I’d opt for a fixed leader of 1024MB and a fixed follower of 512MB; of course this is still prone to single-node failure, so monitoring would be worthwhile. It’s also more expensive than all the other options, so only do this if you want to control where your data gets to.
Plus, if you’re just in testing mode, you can always set up Cron to switch off your db server compute in the small hours, squeezing out another saving.
† per the valuable thread discussion, it’s worth emphasising that no types of hosting are completely resilient to disk failure.
Any more for any more?
Feel free to chip in with any of your own things y’all using alongside Fly. FWIW I’ve no financial interest in any companies listed above, just creating a resource. Maybe every time we see a sword-of-Damocles database running in Fly, we can point folks here?