sam.oriental
sam.oriental
RRailway
Created by sam.oriental on 7/25/2024 in #✋|help
Cron jobs randomly changing to "railway up" instead of github repo
No description
24 replies
RRailway
Created by sam.oriental on 7/15/2024 in #✋|help
Horizontal Scaling -- Scaling controls
We're currently using Railway to host a critical node microservice that processes long-running tasks. Our architecture utilizes BullMQ for task distribution from a coordinator across multiple node workers. I would like some guidance on the ability to control how my scaling is done: When downscaling, we need to ensure that the long tasks are not abruptly terminated, causing a data loss. Is it possible to target and gracefully kill specific replicas? This would allow us to implement a controlled downscaling process where we can ensure all tasks on a replica are completed before it's terminated. We're considering using process.exit(0) call if it works. Would this approach work within your infra? If so, at what point in the scaling process should we trigger this - before or after making the API call to reduce the number of replicas? Currently im planning on using the railway API to add and remove replicas but I don't know how to control how these actions are completed. Internally I can track the RAILWAY_REPLICA_ID without an issue but I have no way to target a replica in any of the actions. Thanks!
28 replies