2 years ago
I am not sure if this is planned for 2024 Q2 under Private Network Overhaul but I think being able to communicate with services over the private network during build would be useful.
Common use case: a lot of full-stack frameworks like Next.js will generate pages during the build process rather than on startup. If the data is stored in a database you currently need to access it using the public TCP proxy since private networking is unavailable.
The downside with the public TCP proxy is that connections do not use any form of encryption (SSL needs to be manually configured and current Railway Postgres/Mongo/... templates do not have an easy way to configure SSL). This means your data is exposed to the internet and configuring your own certificates and custom database images to support SSL is difficult/time consuming especially when spinning up a default database on Railway takes two clicks. Also network egress fees exist for public traffic.
I am assuming though that traffic between two services (during build) in the same project and region using the public TCP proxy URL shouldn't exit to the internet, and if this is the case maybe mentioning it in the docs would be helpful.
3 Replies
2 years ago
It is absolutely planned and being actively worked on last I heard.
The beta builder may or may not already support it, I can't recall, but can't hurt to give it a try -
https://railway.app/changelog/2024-05-24-builder-v2-beta#builder-v2-arrives-in-beta
Edit: Just got confirmation, the beta builder is part of the environments private network, you can call the other services during build the same way you can them during runtime!
2 years ago
Very good to hear, I see I'm a couple weeks too late. Will be trying the new builder out, thanks!