How to speed up Django FileField download speed?

I have a FileField that uses S3BotoBackend to upload audio files to django-storageages for Amazon S3. Audio files can be up to 10 MB in size, and the user can upload multiple files into the same form. Download times can be very long and block. To speed things up, I thought of writing my own backup storage that inherits from S3BotoBackend and sends jobs to the beanstalk queue before uploading to S3.

Are there any simpler alternatives to speed up the user experience?

+5
source share
1 answer

If you want to speed up the process, you will want your web server to do more processing of downloads. You can check the Nginx download module for Nginx, although you can do most of the work with any web server.

For this approach, you will configure the view that will receive the request as soon as the file is successfully uploaded by the user, which will be the right moment for the file upload queue on S3.

This will allow you to asynchronously receive multiple downloads from the user and asynchronously send files to S3, which should cover everything you could do to improve the file upload process.

+2
source

All Articles