Image caching vs. image processing in PHP and S3 -


The thing here is right now I have this e-commerce web site where people can send many photos for their products. All images are stored on Amazon's S3. When we need thumbnails or some things, then I check on S3 if someone is available. If not, I do a process and send it to S3 and display it on the browser. Thumbnails of every different size are stored on S3, and checking the thumbnail availability for every request is to consume money. I am afraid that after paying more attention to the site, I will pay a lot (if it is ... ). Thinking of the option, I was thinking of placing the original pictures on the S3 only. Process the images flying on each request. I think that in this way I use the CPU, but I see a standard Not made me how far I can go. The thing is that I will not dismiss requests to make money and store more images on S3 and I can cache everything on the user's browser. I know it is not safe to do this, that is why I am bringing this question here.

What do you think? How do you think I can solve it?

Place the local cache of

:

  1. Which images in S3
  2. Cache of most popular images

Then in both cases you have a local reference if the image is not in the local cache, you can see the local cache You can check whether it is in S3 or not. Saves the S3 traffic for your most popular item and saves on latency while checking the S3 for one item in the local cache.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -