I have a web application. It is database and file driven (database is postgresql, users upload and create files)... I would like to balance the load between two+ servers, and that means not only database replication (which I can achieve with tools like Slony), but also real-time file replication.

The file replication is necessary because a user could log in in a first server, log out, then log in in the other server (because of the balancing), and his files should be there. I don't really need to duplicte the whole drive, just a group of folders.

Also because if one server fails, I would like to have the other one with a full set of all data & files.

Is there any tool available on linux that automates reliable file replication, like the way Slony does for databases ?

Is DRBD a recommended solution ?

link|improve this question

33% accept rate
Would mounting a network drive (NFS share) work for you? If not, why not? – David Zaslavsky Jun 26 '10 at 6:44
maybe... i´m looking for the simplest of solutions, yet scalable and efficient : ) – arod Jun 26 '10 at 14:41
feedback

2 Answers

We use Gluster for this, it works like a charm.

link|improve this answer
feedback

What is needed is a bidirectional filesystem (or folders) syncing. Search for Unison or DirSync Pro and give them a try

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.