Upload synchronisation across multiple servers
I have vanilla replicated across multiple servers (1 media temple and 3 load balanced rackspace cloud servers). The problem I have run into is synchronising the uploads.
Server 1 uploads an image or document. It is stored in local Vanilla uploads directory.
If I log into Vanilla through server 2 obviously the image cannot be found as it is sitting on server 1.
I can see that there is a PATH_UPLOADS constant in constants.php and that media is stored in the database as a relative path within the specified directory. Is there a way to upload to a shared remote location via ftp or similar when an asset is uploaded?
It would need to take into account that when the asset needs to be displayed it can use the remote url.
Of course I could use rsync and get each server to use ssh to update their own upload folders but this would require that all servers are aware of and have permission to access each other.