Web-server – Is GlusterFS a good pick for keeping webservers in sync

csync2glusterfslsyncdreplicationweb-server

I've got 2 webservers, with the chance of having to add more servers along the way. Right now I keep these servers in synch using lsyncd + csync2. It works well performance wise because all files are on both servers (no network access required to open files locally), but not so well in other cases.

One example of this is if I delete a file on server 1 and immediately uploads a new file to server 1 which has the same name. The file would then be deleted from server 2 in the meantime, causing the newly uploaded file on server 1 to be deleted as server 2 sends the delete event on to server 1 to complete the "update circle".

I can't help thinking that there must be a better way to keep servers in synch. I've been looking at GlusterFS, and I see that a setup where all files are replicated to all servers are discouraged. However, I'm running CMS systems like Drupal on these servers. Such CMS systems often opens quite a few files, and I'm worried that too much network traffic to get hold of these files will slow down the requests.

Would it be an idea to look into replacing lsyncd + csync2 with GlusterFS set up to replicate all files to all nodes, or is that a bad idea?

Best Answer

BitTorrent Sync may do the deed for you. I'm using it to keep files in sync between a few internal servers at my house and it's doing the job wonderfully. The other thing you'll need to think about is the backend database when your app uses a CMS. Make sure that there's MySQL replication going on, or something of that sort.

Related Topic