Re:How to use Amazon’s S3 web service for Scaling Image Hosting
by jrnkntl on Wednesday July 14, 2010 @06:34PM
(#1516190)
From the article:
"For performance, each of our image servers cache the source, and any resize, locally to disk. Since images are never updated (only created), and get a unique ID for each one, we don’t have to worry about cache invalidation, only expiration. We can then write a simple script to remove images from this disk cache with files of an access time greater than a certain threshold (say 30 days). That way, if we change from one size thumbnail to another, eventually the old thumbnail sizes will get purged."
Re:How to use Amazon’s S3 web service for Scaling Image Hosting
by daryn on Wednesday July 14, 2010 @06:56PM
(#1516237)
Like jrnkntl said, we cache all resized copies.
The reason we resize and apply effects at request time instead of at upload time is that our design needs may change over time, and this way we don't need to go back and batch reprocess things.
Based on your steps listed here 1.Handle request 2.Fetch original source image from S3 3.Resize/apply effects 4. Return result back to user. Why not just resize/apply at time of upload and store in S3... are you resizing and applying effects on every request for an image ?