Deployments
ogbcode
PROOP

15 days ago

Is there a way to configure Railway deployments so that traffic is only switched after the new deployment is fully running and ready?

Currently, there appears to be a brief delay or interruption during deployments, where traffic is routed to the new service before it has finished starting up. I would like the existing deployment to continue serving traffic until the new instance passes a readiness or health check.

Is this behavior configurable on Railway, or is there a recommended approach (for example, health checks or readiness endpoints) to achieve near zero-downtime deployments?

Solved$10 Bounty

Pinned Solution

darseen
HOBBYTop 1% Contributor

15 days ago

You could implement a Healthcheck to ensure the service is fully ready to handle traffic after new deployment. You can set the Healthcheck path in your service settings. Here are the docs for it as well. If you want more control over your deployments you can use Deployment Teardown.

2 Replies

darseen
HOBBYTop 1% Contributor

15 days ago

You could implement a Healthcheck to ensure the service is fully ready to handle traffic after new deployment. You can set the Healthcheck path in your service settings. Here are the docs for it as well. If you want more control over your deployments you can use Deployment Teardown.


You can configure deployment overlap times with the RAILWAY_DEPLOYMENT_OVERLAP_SECONDS variable.

You can also enable enable Teardown in service settings as darseen mentioned.

https://docs.railway.com/guides/deployment-teardown


Status changed to Solved brody 10 days ago


Loading...