Hi Folks,
I have a tricky problem. I also have a couple of solutions, but I want to see waht you folks can come up with.
I have a PHP application deployed on my site. The site is running on a loadbalanced webfarm - multiple servers serving the same content. Each of these servers connect to the same database server. So far, so good.
I am now adding in a content-management element into the site, to allow users upload content (mostly jpg's).
My problem is that, when the user uploads his file, it only uploads to the server he happened to be connected to. So now my load-balanced servers are out of synch.
I have considered the following solutions.
Store the images as blobs in the database. Seems reasonable, but I am getting a lot of negative feedback on that.
Store the images in one folder on one server and create symlinks to that folder on the other servers. This brings us back to a single point of failure.
Instead of updating the file directly, pass it to an external piece of software which will manage the synchronisation. The logic on this could prove tricky, and it might cause problems with asynchronicity.
Anyone of you run into this situation before? How did you deal with it?
Thanks,
Zing