Question

We have a situation where users are allowed to upload content, and then separately make some changes, then submit a form based on those changes.

This works fine in a single-server, non-failover environment, however we would like some sort of solution for sharing the files between servers that supports failover.

Has anyone run into this in the past? And what kind of solutions were you able to develop? Obviously persisting to the database is one option, but we'd prefer to avoid that.

Was it helpful?

Solution

At a former job we had a cluster of web servers with an F5 load balancer in front of them. We had a very similar problem in that our applications allowed users to upload content which might include photo's and such. These were legacy applications and we did not want to edit them to use a database and a SAN solution was too expensive for our situation.

We ended up using a file replication service on the two clustered servers. This ran as a service on both machines using an account that had network access to paths on the opposite server. When a file was uploaded, this backend service sync'd the data in the file system folders making it available to be served from either web server.

Two of the products we reviewed were ViceVersa and PeerSync. I think we ended up using PeerSync.


OTHER TIPS

In our scenario, we have a separate file server that both of our front end app servers write to, that way you either server has access to the same sets of files.

The best solution for this is usually to provide the shared area on some form of SAN, which will be accessible from all servers and contain failover.

This also has the benefit that you don't have to provide sticky load balancing, the upload can be handled by one server, and the edit by another.

A shared SAN with failover is a great solution with a great (high) cost. Are there any similar solutions with failover at a reasonable cost? Perhaps something like DRBD for windows?

The problem with a simple shared filesystem is the lack of redundancy (what if the fileserver goes down)?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top