node.js - Heroku dynos not sharing the file system -



node.js - Heroku dynos not sharing the file system -

my heroku web app has feature download images s3. works this:

there 1 endpoint (a) request downloading array of images, returns task id. those images downloaded tmp heroku folder of app. , when images downloaded, zip file created. while images can still downloading, web client calls endpoint (b) task id point 1. sec endpoint checks how many images downloaded homecoming progress percentage. when zip created "returns" zip file , images downloaded.

this approach worked fine in heroku 1 dyno. unfortunately, after scaling 2 dynos, have realised doesn't work anymore. reason dynos in heroku doesn't share same file system, , endpoint , b managed different dynos. therefore, dyno in endpoint b doesn't find file.

is there easy way create approach work multiple dynos?

if not, how should implement feature described? (downloading multiple images s3 in zip file)

you create sec s3 bucket , force zip file sec s3 bucket 1 time it's done downloading. can redirect client download zip file straight s3.

then setup process run periodically clean out old in s3 bucket.

node.js heroku amazon-s3

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -