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

Location of image processor S3 Cache files #37

Open
jattwood opened this issue Sep 18, 2019 · 2 comments
Open

Location of image processor S3 Cache files #37

jattwood opened this issue Sep 18, 2019 · 2 comments

Comments

@jattwood
Copy link

Elijah,

Awesome project. I am using it currently in 2 deployments and it's great - big thank you. Something that has been nagging me though is that the Media image source is centralized to S3, yet the cached files produced by imageprocessor still remain on the individual web servers which (in my mind) defeats the purpose of centralizing assets.

This led me to some investigation and I stumbed on the project ImageProcessor.Web.Plugins.AmazonS3Cache by James Jackson-South. The documentation is pretty scant (none) and there's a lot of guesswork in setting up the imageprocessor/cache.config. But I have it up and running and now both media and cache are served of s3. I have yet to performance test this, but it looks promising.

Since imageprocessor is integrated into the Umbraco core, maybe you can mention in the documentation the existence of this project as it seems to be a compliment to the goals of this project.

Thank-you,

Jamie Attwood

@marcoteodoro
Copy link

Hi @jattwood, I know this is a very old issue, but how far did you go with this? I'm thinking in following the same approach.

@jattwood
Copy link
Author

Hey there. Yes I did and during the process discovered an issue whereby the AmazonS3Cache was not setting headers to allow images to locally cache thereby forcing a new image down the pipe each time. That bug was fixed and it worked great after that.

One thing to investigate though is if you are using multiple instances of Umbraco (assuming you are) in a horizontal scaling set-up that the hashing algorithm on each instance is the same. A hash is used to create the directory structure of the cache, and if they are different on each server, then there is not much point because the cached images will only work off the server that initiated the creation of the cached version of the image. I never fully explored that scenario, I would hope that they would all be the same in which case it would be a great solution. If they are different, then there is not much point to doing it if you have multiple server instances. Hope that helps!

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

No branches or pull requests

2 participants