In web cluster, should program files be synchronized or mounted?

WBOY
Release: 2016-09-23 03:30:08
Original
1079 people have browsed it

In a web cluster, it is important to ensure that the program code files of each machine are the same.

There are generally two solutions,
The first is to synchronize the uploaded code to each server through synchronization software, that is, each machine really has its own code.
The second is to mount one on each server Public file storage server.

Of these two options, the second one is obviously easier to manage.

The first possibility has better performance, because the local files are read directly when the website is running. But it is inconvenient in management. For example, if logs are recorded in the program, then multiple servers have their own logs, and these logs need to be managed. , it also needs to be merged, and it is not a simple merge. The log files with the same name on multiple servers on the same day have intersection times, and they need to be sorted for log analysis and management.

One method is to store the logs separately on a jointly mounted server. This is indeed what the website's file upload business does.
However, there are many website projects, programmers use different language frameworks, and the log directory configurations are inconsistent. , so you have to manually change the log saving directory for each program.

I prefer the second method, which is to mount each web server together, but will this be a problem in a large cluster with dozens or hundreds of servers?
The code files running on hundreds of web servers are all Commonly mounted to a file server?

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!