1
I've got 4 servers in a load-balancing setup. And I've got a wordpress app on which I need to upload images. Now there is rsync set up on all the servers on a cron with a 1 minute interval with the options
rsync -rav --delete
Consider the 4 servers as Server A, B, C, D. Lets say that the image is uploaded on Server B. Now if the cron on Server A is fired it'll delete the images on Server B, when the intent was to copy the images from Server B to C, C to D and finally D to A. How can I have such a setup?
Any particular reason you don't have one 'master' that isn't synced to? – Daniel Beck – 2013-05-20T11:34:32.000
That's because the upload can come from an external user who is not aware of the existence of the 4 servers, so the uploaded image can come to any of them. – Batman – 2013-05-20T11:36:52.187
Why aren't you uploading to the master? – Ignacio Vazquez-Abrams – 2013-05-20T11:40:09.417
The upload is done through the Wordpress UI which can send it to any of the servers, which the browser is bound to at that instant – Batman – 2013-05-20T11:45:04.523
I think what @DanielBeck meant was that you have one server which you sync everything to, then you sync everything from that server to each of the other three. That way the only server that does --delete is the one that is supposed to have the combined view. – a CVn – 2013-05-20T12:15:03.283