I have been digging around and can't really figure out which software can synchronize files automatically to other web servers. Just like Facebook. they have many servers but when you upload something, it's accessible from almost every server. I need like to synchronize a new file that has been added from the current server to other servers, so that they have the same file as it is on the current server.

  • Look into using something like rsyncd – Raman Sailopal Oct 25 '17 at 8:42
  • doesnt work automatically – Dennisrec Oct 25 '17 at 8:43
  • 1
    Another options is disk level read/write replication other the network i.e. through drbd but this may be "overkill" depending on the rate of read/write and perhaps not an ideal solution if servers are sitting remotely on the Internet. – Raman Sailopal Oct 25 '17 at 8:50
  • You'll have to describe exact files types. You can use rsync or lsyncd for static files. Keeping databases in sync, will have many additional approaches + require some deep design consideration. Another tack you can take is running LXD on all your machines + syncing entire LXD containers, which may be easier. – David Favor Oct 25 '17 at 10:45
  • inotify and rsync can be used for that. inotify will trigger an event when something changes on the filesystem and rsync will then react to that event by syncing the file(s). – Nic3500 Nov 2 '17 at 10:56

That is not a simple question, it is really complex and there are many way to achieve this, not all of them has the same performance.

  • To share static files like images, you can use file server and put the data that you want to share between the servers in that folder and mount that folder in all the servers,
  • To sync code, you can use git hook, like the github one, and use some thing for deploy this code for example (jenkins), then github hook, will run task in jenkins, and you can configure the jenkins task to deploy the code to multiple servers

The question is really big and each part of it could be a blog or book

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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