0

I recently deployed a Flask app on Heroku. Right now the backend is all managed through MongoEngine. I have an issue though, which is that I have some fairly large static files (about 30 Mb in total) which I need to load very quickly. (It's an ML system).

I can't really find any documentation around how I would approach this, so any help would be appreciated. Also if I'm asking the wrong question please let me know. I'm basically just looking for a very fast way to load static files on a Heroku App.

Slater Victoroff
  • 21,376
  • 21
  • 85
  • 144

1 Answers1

2

Serving static assets of AWS S3 is the recommended approach.

friism
  • 19,068
  • 5
  • 80
  • 116
  • I think the OP wants to *read* them into dyno memory? If so, reading them yourself from S3 is not bad, I supopse. I've never tried putting them in git and including them in the slug (max slug size is now 200MB), but other than being inelegant I supopse that's the fastest way. – Nitzan Shaked Aug 05 '13 at 16:19
  • Serving them out of cloudfront which is backed by S3 will probably get you an additional speed boost. – Liyan Chang Aug 09 '13 at 23:29