How much does it cost to host a large prostgressql database in railway?
I need to host a database of several million lines and I'd like to know how much it will cost and if it won't pose a performance problem
20 Replies
Project ID:
N/A
@Brody
It's not really as simple as just saying the cost amount
a database on railway is priced the same way as your service
you pay for the RAM and CPU it uses
( 10 dollars per gb per month and 20 dollars per cpu per month )
and you pay for the volume usage ( 0.25 per gb per month )
and youd need to be on pro for the 50gb volume and thats 20$ a month
I keep forgetting to add that
OK, thank you very much for your reply !
And for you, what are the advantages/disadvantages of Railway compared to Google Cloud SQL or Amazon RDS?
(I need to convince my company to use Railway because I'm a fan of the platform's simplicity π )
The biggest advantage is that your database will be able to communicate with your railway deployment through private networking, which is very fast and doesn't count towards your egress usage, and of course - ease of use
but keep in mind railway's postgres databases are not managed, you are responsible for the database, they are just plain postgres docker images
For private networking, do I need to use the DATABASE_PRIVATE_URL variable ? Or does DATABASE_URL work too ?
The
DATABASE_PRIVATE_URL
variable is for connecting to your database via private networking and DATABASE_URL
is for connecting to your database over the public networkwhen you say they're not managed, does that mean I have to do something to improve performance ? beyond optimizing my database schema
im more so talking about, if the database decides it wants to start using 16gb of ram, there is nothing stopping it and railway wont try to trim that
and how can I stop something like this from happening for no reason?
you cant, thats just postgres for you
but you can just restart the database
hum ok, thanks for answering all my questions !!
im not trying to scare you away, but
the drop offs are restarts
these where caused by backing up the database
I'm a bit lost, there's no way to prevent this ? (apart from setting a hard limit on use).
its just host postgres acts
there also is no way to set a hard limit on resources, only spend
ok thanks you