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 ?