Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize using the library with Nginx as a proxy to AWS S3 #73

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

davidfischer-ch
Copy link
Contributor

Hello,

Many years ago I made some changes for the sole purpose of integrating this module into both personal and professional projects that are running on Amazon Web Services and using S3 as a backend for the media assets.

This module helped me to build a secured yet scalable and efficient assets storage by proxyfing S3 with Nginx.
The applications are offloading data transfers to Nginx thanks to X-Sendfile header.

In such a setup, trivial operations such as computing mime type or file size requires unnecessary roundtrips (and data transfer) from S3 to the servers. I investigated the issue and found a neat way to optimize such a setup.

Basically I had two means to optimize the storage :

  1. Precompute values (e.g. mimetype and size) and store into the application's DB.
  2. Let the backend (Nginx + S3) do their job (return HTTP 404 if file is missing, add Content-Type header, etc).

Actually there two projects running in production (Django and Flask) with this module (my version of it).

I would be glad to contribute to this repository and offer the opportunity to other users to use these features ...

Thank you for reviewing the changes.

Best Regards,

David Fischer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant