2 years ago
We're thinking of migrating our k8s stack over to railway. An important requirement for us is to be able to do blue/green deploys so that breaking changes between our backend and frontend servers can be done without thinking about intermediate steps. I haven't seen any docs on this. Can this be done in railway?
6 Replies
2 years ago
Railway does blue/green deployments by default, but only on per service level meaning there's currently no mechanism to have two services go out together or fail together, on account of services having no real link between each other.
2 years ago
there's currently no mechanism to have two services go out together or fail together, on account of services having no real link between each other.
Gotcha!
As a workaround, if we setup nginx to route traffic between the backend and frontend services could we then:
Create a new pair of services every time we want to deploy a new version of our app
Wait for the new services to be up with the health-check config
Point nginx at the new services
Delete old services
?
Not as pretty as having only 2 services go out together or fail together but that would let us consider moving to railway
2 years ago
Another idea: you could have the healthcheck endpoints of each of the services reach out to the other services to return a 200. That way you effectively couple all services together.
2 years ago
Seems a bit complex with room for issues, you could run the frontend and backend in the same container that way they already go out together.
2 years ago
you could run the frontend and backend in the same container that way they already go out together.
Hmm that would mean that they both have to scale equally. In our infra, the backend is a LOT more resource heavy than the frontend.
2 years ago
Yep it's not a perfect solution either, please express your need for this here -
https://help.railway.app/feedback/service-dependencies-rollouts-6b418f05