Need help with estimating possible service cost on Railway
We made a nodejs application that sends out emails to a lot of users (like 300k - 400k) using sendgrid api. While I'm excited to keep using Railway as hosting platform for our projects, I'm very concerned how much Railway would charge us for possible network bandwidth/RAM/CPU usage.
We don't want to end up in situations like Railway charging us $10k (like crazy AWS bills 😄 ).. so if you can help us estimate the possible cost in the scenario like our application. Thanks in advance!
42 Replies
Project ID:
330924c6-f27a-45c6-a607-8a0bb0d88515
330924c6-f27a-45c6-a607-8a0bb0d88515
^ this is the service I'm referring to
just visit the account usage page https://railway.app/account/usage
yeah i usually check that
but can you let me know how to estimate that for some scale of users?
e.g. let's say we want to do with 1k users first, then how can I check the usage of bandwidth/cpu/memory?
The estimated usage of your app is adaptive according to the usage you put through it. I would incrementally increase the amount of traffic you put through it, fake or real. Increase that every 2 days so you get an accurate representation.
Once you have 4 or 5 data points you'll be able to graph a decent estimation
Ok makes sense, will do so, thanks
@Adam
I also have another Q; it's about general usage of internal networks between projects.
We have 2 services deployed; one is REST API, and the other is node.js script, api consumer. I believe using internal network IP of REST API would cost less bandwidth, and be faster because using the external host goes through the internet (also DNS requests) etc?
I don't believe it would be faster, but using the internal IP eliminates network charges entirely
(it is faster)
(dont use ips, use the internal domains)
this one?
Yep agreed, missed that part of your question. Railway uses dynamic IPs, so you can't connect to an app through its IP. Use the private networking url
Yes
ok awesome
is it same for connecting to postgres db?
and redis?
Yes
they have private URLs
ok awesome
As long as the DB is on Railway, yes
yes we have everything on Railway
and in the same project, and is a database v2 service (has a volume)
@Brody btw I started Postgres db migration like 20 mins ago, and it's still going on. I just realized I should've not started this operation when the dashboard is having issues atm 😅
We have data like size of 15mb, so it shouldn't be taking that long. Would you be able to check what could be wrong?
cc @Adam
this is the uuid of the postgres plugin
neither of us work for Railway, so I'll have to tag in @jr
Aha okay. Thanks in advance jr for taking a look
migration just completed successfully
I just poked it as it was having trouble reading the logs indicating that everything migrated
@Wukong can you confirm your data is all in place on the new database?
Yeah it worked, thanks jr
awsome, be sure to use the private url now!
Yeah, I actually have a problem with that. 1 out of 3 services is having trouble connecting to the postgres db through internal URL (2 other services are working fine)
yeah there do be some issues sometimes, what is the specific error youre getting?
It's typical db connection error
and you can access it publically right?
yes, using public URL
I have 2 other services using this type of internal URL and they just work fine
are you using variable references on your railway service? (to referance the private url?)
Is the service inside the project? The private URL only works between services in the same project
Private networks take sometime to initialize on deploy, you can add a simple
sleep 10
in the start of your npm script.
Also, private networking isn't available during build phasewoah woah 10 is overkill, 3 is sufficient
i had a case where 10 seconds was the minimum to start, but yeah try with 3 seconds first
I just found that I have the same issue with connecting to Redis through its private URL.
are you using ioredis?
yes
and also postgres connection (through internal url) is intermittently working.
db connection worked from 00 - 03:05, then at 04:05 it didn't work
that I don't know anything about, sorry