Scaling your applications in Railway is made easy with configurable options for horizontal scaling as well as vertical autoscaling out-of-the-box.
By default Railway will scale your service up to the specified vCPU and Memory limits of your plan.
Scale horizontally by manually increasing the number of replicas for a service in the service settings. Increasing the number of replicas on a service will create multiple instances of the service deployment.
Load Balancing Between Replicas
Railway will round-robin requests to the replicas of a service. If you need more advanced load balancing, you can use an external load balancer such as Cloudflare to distribute traffic between your services.
We plan to add more advanced load balancing strategies in the future.
For now Railway does not support sticky sessions nor report the usage of the replicas within the metrics view.
For information on how to use horizontal scaling with replicas, refer to this guide.
Edit this file on GitHub