Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm running Magento CE on multiple web node. The Admin Backend is always running on the same server, so all the images are uploaded on this server. On my

share|improve this question
I think some of your question got cut off. – dannymcc Feb 7 '12 at 19:33

2 Answers 2

The simplest method would be to use rsync with inotify on your admin server - so new images are distributed instantly around other nodes.

An application like would work well and produce near-realtime replication.

You also have to bear in mind that on a cluster, you will have resized cached images generated on the fly, so it is also a good idea to rsync the


directory circularly between all nodes. This doesn't require inotify and can run on a lapsed ~10 minute cron.

This method will obviously become more and more inefficient the larger your media directory grows.

But if you have a BIG site

However, if your site is so large that it requires a cluster to begin with, it only seems sensible to be using a CDN for all media. Magento has a myriad of support for different CDN providers

share|improve this answer
How does the CDN provider know from which web nodes it can load the resized image? Or do you know a Magento CDN push integration? – Tobias Zander Feb 8 '14 at 15:44
It makes no difference really - as even on an origin pull basis, even if it hits a node without a cached image - the web node will generate it anyway. The important thing is that the media is present on all web nodes for the cache to be generated. – Ben Lessani - Sonassi Feb 8 '14 at 15:51
Unfortunately the cache files are only generated on the initial php request (resize method in views), the image request is just static and if the file does not exist outputs a 404 :( – Tobias Zander Feb 10 '14 at 9:46

When it comes to cache files, one possible effective way is to use a NFS share volume and mount it on all the webservers. This way you can ensure the availability of cached files for all the webservers and even this helps if you want to purge any.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.