Deploy skew protection - Railway Help Station
Add Vercel-style skew protection:https://vercel.com/docs/skew-protectionVersion skew is an issue with deploys: when an old client is still loaded in the user's browser, but there's new server code deployed, errors can occur due to the mismatch. For example, if there's a breaking change to an API endpoint, e.g. new required params or a removed parameter, the request from the old client to the new server will fail.For typical REST or GraphQL API endpoints, this is only a problem on a breaking change, and it's possible to adjust the development process to try to avoid these breaking changes. However this is much more painful with Next.js server actions because each server action is addressed by a UUID that regenerates at build time, as opposed to e.g. the stable name of the RPC function or API pathname. We see tons of errors like "server action id 1234abcderg832 not found" when deploys happen. This renders server actions basically unusable in production for us.It would be awesome if the old deploy could stick around for some amount of time and clients on that version could continue to be routed to it. Individual apps could decide on the appropriate strategy for their use case for how/when to force clients to refresh to get the latest server version.Check out Vercel's reference implementation — there are various settings that can be tweaked to control how long the prior deploy(s) should stick around, as well as a way to force-terminate/upgrade clients. | Get Help with Railway
station.railway.com · Railway Help Station