I have 3 web servers for my PHP application. In front of web servers, there are load balancers. My application has a upload image form. I need to have any uploaded image via my form, simultaneously be in all 3 web servers. I try to think about various ways but I can't decide which solution would be perfect for production environment. All of my servers are Debian Squeeze by the way.
Could you please suggest new ideas for me or review my ideas below :
PHP script can save images three times: one into local server and 2 other web servers via network share or something else.
PHP can save image into local file system and initiate rsync operation to send the uploaded file to other two servers.
Upload folder can be on only one of web servers. On the other two servers, upload folder can be remote ssh mount (with fuse or something else). (But with this option I should take the risk of single point of failure. It is a bad thing)
Images can be saved another server like DB servers (MySQL, PostgreSQL) but I don't want images to be in DB.
Anything to suggest?