Home >Backend Development >PHP Tutorial >If you want to keep the root directory of the website on 20 servers consistent (such as load balancing), how do you keep the files updated synchronously? The more detailed the better

If you want to keep the root directory of the website on 20 servers consistent (such as load balancing), how do you keep the files updated synchronously? The more detailed the better

WBOY
WBOYOriginal
2016-07-06 13:51:531112browse

If you want to keep the root directory of the website on 20 servers consistent, how do you keep the files updated synchronously?

Reply content:

If you want to keep the root directory of the website on 20 servers consistent, how do you keep the files updated synchronously?

It must be a distributed file synchronization system. Generally, simple operations will have problems. The one mentioned above is fine

The oschina git I use has a web hooks function when you push code to the server. The git server will request the URL address you specified. At this time, you can execute system commands on that URL to update (please pay attention to security issues)

rsync?

rsync

NFS, directly mounted on multiple machines

inotify rsync

ansible

svn/git ansible

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn