Egress discount

Hello, First of all and most importantly, at the connection on discord you told me i wouldn't be able to draw a little happy tree. May I prove you wrong with the image attached. Now, less important but still a bit for my bank account, I'd like to understand the egress charge and discount. As you can see on the image attached with the little happy tree, my app is being used a lot and that excites me as it's working well with thousands of users but the bill scares me. However, I see a "egress discount" so the question is: will I pay 70$ or 5$ ? How is calculated the egress discount? Will it be there for every months? Also, if I upgrade my plan to 20$/month instead of 5$/month, will that allow me of more "free" egress charge / discount? Thanks a lot!
No description
No description
52 Replies
Percy
Percy5mo ago
Project ID: 81159d75-33b8-4db5-b2b1-640f73bdcca3
alexisdessard
alexisdessard5mo ago
81159d75-33b8-4db5-b2b1-640f73bdcca3
Brody
Brody5mo ago
have a look at this email we where sent on November 14th 2023, tl;dr that discount will not continue
No description
Brody
Brody5mo ago
what is the source of your increased egress fees? are you connecting to a database over the public network? or is this just egress from data your app is sending to users?
alexisdessard
alexisdessard5mo ago
Can you confirm me the agress discount will be real for this month as written on my screenshot? Basically, at entering in my app the users downloads a /GET of my server that have a 4000 lines JSON. Which shouldn't be heavy but multiplicated by 15000 users that uses it several times a day, I reach hundreds of gigas of download. And yes i'm connecting to mySQL database which is in the same railway project.
Brody
Brody5mo ago
I would have to ask someone the exact dates that the egress discount lasts until, I'll get back to you on this. but in the mean time, are you connecting to your database via the private url?
alexisdessard
alexisdessard5mo ago
Thanks a lot, waiting for the confirmation. I am connecting to the link that is shown from railway on my server, to be sure I answered your question, attached two screenshots of my project. The link i'm connecting to is the one generated by railway (white on the screens just in case). And my SQL database is also the one in the same project.
No description
No description
Brody
Brody5mo ago
right that's good, but more specifically, are you using the private url variable that the mysql database provides?
alexisdessard
alexisdessard5mo ago
I'm using evironment variables. Basically, I copied/paste the variable from MySQL and pasted it into the server environment variable. Could you explain me why the question? Does it affect the egress? Isn't it the best practice?
Brody
Brody5mo ago
if you are connecting to the database via its public url then you are subnetting yourself to extra avoidable egress fees. if you connect to it via the private url then there would be no egress fees on the database. what kind of url are you using? does the domain part of the url have the word "internal" in it?
alexisdessard
alexisdessard5mo ago
If you're avoiding me the only big cost I have (egress fees) imma at least tattoo your name on my arm. So I just discovered this private link, however even by adding it a port :3000 it doesn't work. How could I use it? (I was using the public without "internal")
No description
Brody
Brody5mo ago
yes using the private url would be free as there would be no public database to service egrees taking place. what is the name of the environment variable you are using?
alexisdessard
alexisdessard5mo ago
Could you tell me which is actually my private link? If I copy/paste the internal link it gives me: [my-server-name].railway.internal but it doesn't reach any site (should at least return me the welcome message of my server - already tried adding https:// or :3000). On the NodeJS server i'm using: MYSQLDATABASE MYSQLHOST MYSQLPORT MYSQLUSER // Unrelated to mysql: MYSQL_ROOT_PASSWORD AUTH_SECRET FIREBASE_CREDENTIAL_JSON NODE_ENV On MySQL I didn't modify it: MYSQLDATABASE MYSQLHOST MYSQLPASSWORD MYSQLPORT MYSQLUSER MYSQL_DATABASE MYSQL_PRIVATE_URL MYSQL_ROOT_PASSWORD MYSQL_URL
alexisdessard
alexisdessard5mo ago
Just saw you're not working for railway though, thanks a lot for your support, in case you're close to Railway team don't hesitate to tell them about this screenshot: it says clearly what you told me about the discount but we're in january and this message still appears. It would be unfair that the discount isn't actually taking into account if I see my current bill of only 5$. I'm preparing your coffee if we solve the problem btw!
No description
Brody
Brody5mo ago
okay we will come back to the private network stuff in a bit
alexisdessard
alexisdessard5mo ago
Also enjoying we're here, could you confirm me the private link isn't slower than the public one?
Brody
Brody5mo ago
private network is faster in 99% of use cases so i was just told that billing cycles that start in January do not get a discount (0%), the issue with that is your billing cycle does indeed start in January, yet you are still being told you get a discount, in fact you are being told you are getting a 100% discount the listed current usage, does that number match the discounted number?
alexisdessard
alexisdessard5mo ago
Weirdly earlier I saw the current usage of 5$ and now it put again a bigger value. Still, it show "5.11 / 79 USD" as if I'm gonna pay 5$. I'd really appreciate to pay the 5$ this time as I have no revenue yet and change the link to the private server in my app...
No description
Brody
Brody5mo ago
waiting to hear back from the team again to use the private network with the database you would want to use these variables instead
MYSQLDATABASE=${{MySQL.MYSQLDATABASE}}
MYSQLHOST=${{MySQL.RAILWAY_PRIVATE_DOMAIN}}
MYSQLPORT=${{MySQL.RAILWAY_TCP_APPLICATION_PORT}}
MYSQLUSER=${{MySQL.MYSQLUSER}}
MYSQL_ROOT_PASSWORD=${{MySQL.MYSQLPASSWORD}}
MYSQLDATABASE=${{MySQL.MYSQLDATABASE}}
MYSQLHOST=${{MySQL.RAILWAY_PRIVATE_DOMAIN}}
MYSQLPORT=${{MySQL.RAILWAY_TCP_APPLICATION_PORT}}
MYSQLUSER=${{MySQL.MYSQLUSER}}
MYSQL_ROOT_PASSWORD=${{MySQL.MYSQLPASSWORD}}
do me a favor, from your usage page, scroll down and click on the project that is incurring all these egress fees, then click view cost by service and send me a screenshot of that table
alexisdessard
alexisdessard5mo ago
I have thousands of players playing on my app right now, could you confirm me 100% I just have to copy/paste your code to replace these specific variables? Also I used from my app MYSQL_ROOT_PASSWORD instead of MYSQLPASSWORD (I don't know why but I did). If I write the following, will it be good? MYSQLDATABASE=${{MySQL.MYSQLDATABASE}} MYSQLHOST=${{MySQL.RAILWAY_PRIVATE_DOMAIN}} MYSQLPORT=${{MySQL.RAILWAY_TCP_APPLICATION_PORT}} MYSQLUSER=${{MySQL.MYSQLUSER}} MYSQLPASSWORD=${{MySQL.MYSQLPASSWORD}} MYSQL_ROOT_PASSWORD=${{MySQL.MYSQLPASSWORD}} After that I will be able to use the previous private network link I told you? I guess I will have to upload my environment.baseURL variable from the app and only then they will be able to use the private link, right?
alexisdessard
alexisdessard5mo ago
No description
Brody
Brody5mo ago
you forgot to click the view cost by service button
alexisdessard
alexisdessard5mo ago
If it can help:
No description
alexisdessard
alexisdessard5mo ago
my bad,
No description
Brody
Brody5mo ago
could you confirm me 100% I just have to copy/paste your code to replace these specific variables? If I write the following, will it be good?
yes the variables you listed are correct
Also I used from my app MYSQL_ROOT_PASSWORD instead of MYSQLPASSWORD (I don't know why but I did).
no worries, what you have covers that too
After that I will be able to use the previous private network link I told you? I guess I will have to upload my environment.baseURL variable from the app and only then they will be able to use the private link, right?
you might be slightly misunderstanding this, the goal of this is to connect to the database over the private network to eliminate future egress fees on the database, nothing more the service you are censoring, what kind of app is it? frontend? frontend+backend? just a backend?
alexisdessard
alexisdessard5mo ago
So you're telling me I won't have to change the URL for my client app to connect to, just link my two services to avoid any other egress cost, that's it? Right now i'm going to change the variables as you told me then, and keep my previous variables in case it doesn't work anymore. It's a mobile app (front then), connected to my railway server It only does GET POST to Railway
Brody
Brody5mo ago
your mobile app will need to use the public url, and there is no way to avoid the egress costs resulting in your service on railway sending data to the client app but by having your service connect to the database via the private network you can avoid any future egress costs on the database
alexisdessard
alexisdessard5mo ago
Update on the global variables modification: it's working well. Of what I understand so, I will only save MySQL egree but not the server egress charges? 🥲
Brody
Brody5mo ago
correct
Update on the global variables modification: it's working well.
can you click the eye icon besides the MYSQLHOST variable on your service, does it show as mysql.railway.internal?
alexisdessard
alexisdessard5mo ago
Yes it does
Brody
Brody5mo ago
and you clicked the eye icon on the apps service, not the database service, correct?
alexisdessard
alexisdessard5mo ago
Correct
Brody
Brody5mo ago
since editing those variables, did your service redeploy?
alexisdessard
alexisdessard5mo ago
Yes, automatically And I've seen it redeploying / removing the previous one
Brody
Brody5mo ago
perfect, then by all accounts your app should now be talking to the database via the private network and you should not see the egress usage of the database continue to rise
alexisdessard
alexisdessard5mo ago
If I understand well, only the smaller egress (on the bottom, corresponding to MySQL) will stop getting higher but the bigger egress (on the top, corresponding to the server) will continue to get higher?
No description
alexisdessard
alexisdessard5mo ago
If yes, any way to stop this getting higher? If I subscribe to the 20$/month plan, would some part be included or something? I just can't pay that amount and I have the "chance" my app is getting very notorious from one day to another but my bank account won't follow
Brody
Brody5mo ago
correct, there is no way to stop it, all plans charge the same for egress. but it should slow down a bit since it will only be sending data to the client app instead of also sending data to the database via the public network
alexisdessard
alexisdessard5mo ago
Ok, not as good news as I thought but still many thanks for your help, I think my project is finally well configured. Just a last question please, how could I gently ask Railway to be sure that they actually grant the egress discount that they show on the actual bill? Telling me "Current Bill 5.15$" and "Estimated Bill 20.87$" but until I add In-App Purchases in my app I'm just unable to pay that for the moment. I completely love Railway since I started it one month ago for its simplicity compared to AWS, but I can't bear that cost.
No description
alexisdessard
alexisdessard5mo ago
Even in the receipt they still show the discount
No description
Brody
Brody5mo ago
still waiting to hear back about the egress discount for your current billing cycle, its January so technically you should not be getting the discount, but even if you do get the discount this billing cycle, there wont be a discount next billing cycle. though next billing cycle your egress would likely be decreased because you now talk to the database privately
alexisdessard
alexisdessard5mo ago
Thanks a lot, gonna wait for the answer.
Brody
Brody5mo ago
i have asked the team directly and will let you know when i know
alexisdessard
alexisdessard5mo ago
To continue abusing of your time, I'd also like to know a bit more about the Pro plan (sorry, servers aren't my strength): - what is the "+ resource usage" - how does "Up to 32 GB RAM / 32 vCPU per service" affects my server: will it simply be faster? - what is a "seat", can I have many different projects with the same plan ?
No description
alexisdessard
alexisdessard5mo ago
Also, gonna grant your coffee right now for your help
Brody
Brody5mo ago
what is the "+ resource usage"
resource usage is stuff like cpu/mem/egress etc, its "plus resource usage" becauce the plan does not come with any included usage like how the hobby plan comes with 5$ of resource usage.
how does "Up to 32 GB RAM / 32 vCPU per service" affects my server: will it simply be faster?
that means each service can use up to 32 gb of ram and 32 vcpu's if needed instead of the hobby plans limit of 8gb of ram and 8 vcpus. the hobby plan and the pro plan use the exact same hardware, so unless you are bumping into the 8gb of ram and 8 vcpus (youre not even close) it wont be any faster at all.
what is a "seat", can I have many different projects with the same plan ?
a seat is just a fancy word for a user, you can have many projects on both pro and hobby thank you so much!
alexisdessard
alexisdessard5mo ago
Considering you've seen my specs in the bill, I deduce I do not really need the Pro plan. Thanks 🤝
Brody
Brody5mo ago
yeah it would add more costs to your bill, since the seat price is 20$ and the hobby plan is only a base price of 5$ and it sounds like this is very much a hobby project that you dont profit from, so you wouldnt need to be on the pro plan
christian
christian5mo ago
Hi Alexis 👋 Christian from the Railway team here! As Brody pointed out above, the network coupons (100% for Nov, 50% for Dec) were time-limited during a transition period. However, I've gone ahead and have added $73 in credits to your account to cover the network egress usage you've accumulated on your account this billing cycle, prior to using private networking. This will offset any egress charges up until now, but you will be charged for any egress you use from here on out.
alexisdessard
alexisdessard5mo ago
Thank you so much, that helps me to breath again. And also congrats for your service, i'm very satisfied about it (but now I do have to optimize the requests weight!). Have an excellent day! 🤝
christian
christian5mo ago
Thank you, same to you!
Brody
Brody5mo ago
closing out! salute