R
Railway11mo ago
DJ

Egress usage - variable references using public endpoints

Reaching out because I'm set to receive an extremely high bill despite having migrated away from legacy plugins about 2 months ago. The cause, from what I can tell, is that component variables (e.g. DBHOST), which my application uses instead of full URLs, have not been reconfigured to refer to the private network as I'd expected them to be. I'm working to reconfigure my app as I'm typing this, but I'd greatly appreciate if someone could help me sort this out.
12 Replies
Percy
Percy11mo ago
Project ID: 69298446-1d12-4445-a665-d9452ffa7aae
DJ
DJOP11mo ago
69298446-1d12-4445-a665-d9452ffa7aae
Brody
Brody11mo ago
the DBHOST variable on the Postgres service is the public host. if you use that in a reference like so DBHOST=${{Postgres.DBHOST}} you would instead want to switch to this DBHOST=${{Postgres.RAILWAY_PRIVATE_DOMAIN}} similarly, if you use PGPORT=${{Postgres.PGPORT}} you would want to use PGPORT=${{Postgres.RAILWAY_TCP_APPLICATION_PORT}} username / password, and database variables are all going to be the same
DJ
DJOP11mo ago
That's what I've just been doing now, but, unfortunately, the migration guide doesn't make this clear so I'm still sitting on what'll be a $100+ bill.
Brody
Brody11mo ago
using the DATABASE_PRIVATE_URL in a reference would make it easier, but ultimately its up to the user to choose if a public or private connection is best for them
DJ
DJOP11mo ago
I suspect I'm going to need someone from the business to reach out here because this is more of a billing issue, but I appreciate the clarification you've provided!
Brody
Brody11mo ago
unfortunately you used the resources and where billed accordingly
DJ
DJOP11mo ago
I was billed based on actions I took at the direction of their support via email and the provided documentation, neither of which cover these details. The fact that Railway routes internal traffic to an external endpoint at all is surprising, especially considering their communication around the changes they made around November.
Brody
Brody11mo ago
The fact that Railway routes internal traffic to an external endpoint
im sorry but thats not how it works, you used a public endpoint, and where charged for the egress traffic
DJ
DJOP11mo ago
I used a DNS entry they provide and which is configured via variable references and which apparently routes to an external endpoint rather than simply redirecting to an internal endpoint based on where the traffic originates from, and more importantly there was never any indication that updating these references was required as part of the plugin migration.
Brody
Brody11mo ago
here is an email from railway that recommends you use the private network, dated November 14th 2023
No description
DJ
DJOP11mo ago
Yep, did that. Check the migration guide - no mention of the variable references outside of the URL variable.
Want results from more Discord servers?
Add your server