R
Railway•6mo ago
Dmitry

Any way to prevent existing apps from restarting when scaling up?

I have a use case where getting a service/app going takes a bit of effort. Essentially there will be a script that has to download about 4GB worth of data (to rebuild a db snapshot) and then start syncing data from a blockchain. Obviously when I scale the app up and down.. I don't want to have to redownload those files every time, etc. I noticed this is the case when scaling up.. it will restart both instances of the app. I'm not changing anything about the app (version, code, etc), i'm just adding more of them? Is there any way to prevent existing apps from restarting when I scale up (I don't care if it deletes them when I scale down obviously)
Solution:
tbh i dont think railway fits this usecase
Jump to solution
20 Replies
Percy
Percy•6mo ago
Project ID: N/A
Dmitry
Dmitry•6mo ago
N/A
Brody
Brody•6mo ago
nope thats just how railway works right now
Dmitry
Dmitry•6mo ago
Shucks cryingman
Brody
Brody•6mo ago
you are using replicas?
Dmitry
Dmitry•6mo ago
I'm planning out the infra right now.. and yes I would like to I guess I could attach a volume? 🤔 Each instance writes data to it's own folders on the volume? so when they restart.. they don't have to redownload the db data
Brody
Brody•6mo ago
you cant use volumes with replicas
Dmitry
Dmitry•6mo ago
wut
Brody
Brody•6mo ago
yep
Dmitry
Dmitry•6mo ago
ahahaha I tried anyway damn that sucks I REALLY do not want to have to use (the name that shall not be cryingman
Solution
Brody
Brody•6mo ago
tbh i dont think railway fits this usecase
Dmitry
Dmitry•6mo ago
Well... I can use a single service.. each with their own volume and scale out via regions no?
Brody
Brody•6mo ago
wdym via regions, you can only choose a single region per service
Dmitry
Dmitry•6mo ago
fml im making stuff up to try and make it work Brody kekw
Brody
Brody•6mo ago
you really are lol
Dmitry
Dmitry•6mo ago
PepoWorkSad thanks for your help
Brody
Brody•6mo ago
no problem 🙂
Brody
Brody•6mo ago
lol
Dmitry
Dmitry•6mo ago
Brody it was the only answer that I felt suited the question OK don't judge cryingman
Brody
Brody•6mo ago
i agree with you