Networking
Private Networking
Private networking is not yet available on Railway. The feature is currently under development.
Horizontal Scaling
Refer to Horizontal Scaling with Replicas for more information.
Cloudflare Load Balancer
Cloudflare offers an LB proxy that can be used to load balance between multiple Railway services. This is another great way to achieve horizontal scaling.
In order to set this up, there are a few prerequisites:
- You must have a Cloudflare account
- You must have a Custom Domain which is on Cloudflare
- Your Cloudflare SSL mode must be set to
Full (Strict)
This is very important
Once you have met the prerequisites, you can follow the steps below:
- Create a new Cloudflare Load Balancer
- Create multiple Railway services (one for each instance of your app)
- Add each instance's Generated Domain to an Origin Pool on the LB
- Set the Host header for each origin to the Generated Domain: Cloudflare Docs
- Visit the Load Balancer's DNS record and you should see your app!
Was this page helpful?
Edit this file on GitHub