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)
20 Replies
Project ID:
N/A
N/A
nope thats just how railway works right now
Shucks
you are using replicas?
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
you cant use volumes with replicas
wut
yep
ahahaha
I tried anyway
damn
that sucks
I REALLY do not want to have to use (the name that shall not be
Solution
tbh i dont think railway fits this usecase
Well...
I can use a single service.. each with their own volume
and scale out via regions
no?
wdym via regions, you can only choose a single region per service
fml
im making stuff up to try and make it work Brody
you really are lol
thanks for your help
no problem π
lol
Brody it was the only answer that I felt suited the question OK
don't judge
i agree with you