What are the benefits of hosting a database on Railway?

gamerkingfaizHOBBY

a year ago

I'm debating whether to self host my Postgres DB or continue having Railway manage it.

This Linode article (https://www.linode.com/blog/databases/understanding-managed-vs-unmanaged-database-deployments/) mentions the following benefits of a managed DB:

  • Automated minor and major database version maintenance

  • Built-in backups with a clear retention period

  • Resizable database nodes to scale up or down based on volume

  • Customizable maintenance windows

  • High availability to keep your database “up”

  • Support for current database versions

  • Built-in access controls to allow or restrict access to database node(s)

I know Railway doesn't have automated DB backups with a retention period, but what about the other points? Do DBs on Railway automatically get upgraded and will they always be "up"?

Solved

5 Replies

a year ago

The biggest benefit of keeping your DB on Railway is having access to private networking which allows your app to communicate with your database over a private network rather than a public one, meaning it won't cost towards your egress and should be faster.
If you move your database to an external provider, it'll add to your egress usage and can thus be more costly.

Railway also does not offer managed databases, so along with backups- it also means you're responsible for your data and your database. Luckily maintaining a database on Railway doesn't take much work but it's something to keep in mind.

In terms of being auto-upgraded, your database will scale until you hit your limit plan in terms of CPU, RAM, and Volume usage. The volume usage limit for hobby plan is 5GB, so once you near that limit you'd have to upgrade to a pro plan which offers a 50GB limit.


Status changed to Solved railway[bot] over 1 year ago


gamerkingfaizHOBBY

a year ago

Thanks for the detailed reply!

Sorry, In terms of being upgraded, I was referring to the first point, "Automated minor and major database version maintenance".
But it's also good to know about the volume usage, I was curious about that too!

Private Networking is definitely a good point too.
Though in my case, I'm debating migrating everything off of Railway and hosting it somewhere else (e.g. a VPS), so that wouldn't be a concern.

I'm trying to find the pros/cons of using a managed service (i.e. Railway) vs me hosting/maintaining everything myself.
Only because I'm finding that my RAM usage on Railway is butting up against the $5 of included usage in the Hobby plan and if I start having to pay more than $5/mo, it might be better for me to migrate to a VPS.

For Node apps, I think the thing I'd miss the most is the easy CI/CD integration with Railway.
For DBs, I'm trying to figure out what I'd be missing out on. 🤔


a year ago

Oh, if you're not planning on hosting your app on Railway then I wouldn't say it's worth using Railway databases. I say this because you can likely find managed databases that are even cheaper than Railway databases, which come with more features as well

Regarding hosting everything yourself, I made my own PaaS a bit ago and I've found it quite relieving not having to worry about the cost of the projects I host on there much. I still use Railway for some projects but I'd say it's worth looking into self-hosting if you're considering it


gamerkingfaizHOBBY

a year ago

Regarding hosting everything yourself, I made my own PaaS a bit ago and I've found it quite relieving not having to worry about the cost of the projects I host on there much.

Did you use Dokku or CapRover? Or something custom?


a year ago

Did you use Dokku or CapRover? Or something custom?

I made it from scratch, figured it would be a fun learning experience


What are the benefits of hosting a database on Railway? - Railway Help Station