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
Project ID:
69298446-1d12-4445-a665-d9452ffa7aae
69298446-1d12-4445-a665-d9452ffa7aae
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 sameThat'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.
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 themI 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!
unfortunately you used the resources and where billed accordingly
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.
The fact that Railway routes internal traffic to an external endpointim sorry but thats not how it works, you used a public endpoint, and where charged for the egress traffic
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.
here is an email from railway that recommends you use the private network, dated November 14th 2023
Yep, did that. Check the migration guide - no mention of the variable references outside of the
URL
variable.