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.
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