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


My Heroko web app has the ability to download pictures from S3. It works like this:

  1. There is an end point (A) to request an array of images, which returns the job id.
  2. Those images are downloaded by A tmp of my code to the Haraku folder and when all images are downloaded, a zip file is created.
  3. Whenever images can still be downloaded, the web client calls from second to second point (B) with job id. This second endpoint checks how many progressive images to be downloaded back to the images already downloaded. When the zip is already built, it is downloaded the "return" zip file and images.

This approach worked well with 1 witch in Heroku. Unfortunately, after scaling 2 dyes, we realized that it does not work anymore. The reason for this is that Dion does not share the same file system in Heroku, and the end point A and B are managed by various dinosaurs. Therefore, Dino does not get any file in the end point B.

Is my approach an easy way of working with many dyons?

If not, how should I implement the said facility? (Downloading multiple pictures from S3 in the zip file)

You can create a second S3 bucket And once downloaded the zip file in the second S3 bucket. You can then redirect the customer directly to download the zip file from S3.

Then set up a process to run from time to time to clear old things in an S3 bucket.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -