Question

Let me start by saying I understand that heroku's dynos are temporary and unreliable. I only need them to persist for at most 5 minutes, and from what I've read that generally won't be an issue.

I am making a tool that gathers files from websites and zips the up for download. My tool does everything and creates the zip - I'm just stuck at the last part: providing the user with a way to download the file. I've tried direct links to the file location, and http GET requests, and Heroku didn't like either. I really don't want to have to set up AWS just to host a file that only needs to persist for a couple of minutes.. Is there another way to download files stored on /tmp?

Was it helpful?

Solution

As far as I know, you have absolutely no guarantee that a request goes to the same dyno as the previous request.

The best way to do this would probably be to either host the file somewhere else, like S3, or to send it immediately in the same request.

If you're generating the file in a background worker, then it most definitely won't work. Every process runs on a separate dyno.

See How Heroku Works for more information on their backend.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top