google-code-export / django-photologue

Automatically exported from code.google.com/p/django-photologue
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

SITE_MEDIA dependency makes for difficult scaling #112

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The current URL generation for images assumes they will be served with the
Django server.  This might be the case for some, but long term, this isn't
really a good idea as there are better servers for static content than
apache/mod_python

instead of using MEDIA_URL, there should be a PHOTOLOGUE_MEDIA_URL that
defaults to MEDIA_URL.  This allows another server to be used to server the
photos, regardless of where they are stored.

Normally I run 2 or more virtual servers and control how the media is sent
out, cached, Expiration times etc based on the server that is sending. 
This means I can run lighttpd for static content and apache for the Django
stuff.  SITE_URL allows this very easily for all the site media (graphics,
css, static html)  However photos can be a huge load and it would be nice
if you could easily offload this to another server that might be
photos.mysite.com.  Initially it might be the same apache host, eventually,
when photos are a large load, it might be a cluster of hosts, but putting
this kind of entry in now means that long term you URLs don't change.

Original issue reported on code.google.com by Mark0...@gmail.com on 27 Apr 2009 at 3:22

GoogleCodeExporter commented 9 years ago
Please check out ImageKit (http://bitbucket.org/jdriscoll/django-imagekit/) or 
the Photologue 3.x branch. 
ImageKit is planned to replace the photologue internals in version 3 and uses 
storage classes for file access so 
you can store the original and cached images wherever and however you want. 
This includes external servers or 
cloud storage such as Amazon S3.

While Photologue 3 is really just a proof of concept right now, ImageKit itself 
is fairly stable and ready for use.

Original comment by justin.d...@gmail.com on 27 Apr 2009 at 3:47