Hi,all:
I have a question about “ngx_http_log_module”.
If we set the “worker_processes” to 2, how the nginx promises the two
process can write to the same access log without disturbing by
eachother!
thanks
Hi,all:
I have a question about “ngx_http_log_module”.
If we set the “worker_processes” to 2, how the nginx promises the two
process can write to the same access log without disturbing by
eachother!
thanks
On Wed, Oct 08, 2008 at 10:10:28PM +0800,
=?GB2312?B?wu25+s6sIDxtYWd1b3dlaUBiYWlkdS5jb20+?= wrote:
Hi,all:
I have a question about “ngx_http_log_module”.
If we set the “worker_processes” to 2, how the nginx promises the two
process can write to the same access log without disturbing by eachother!
AFAIK (and I may be wrong) POSIX guarantees that writes below a certain
length (I think it’s 512 bytes in POSIX and a page in Linux) are atomic
and thus guaranteed to never get mixed up. So nginx can simply write()
the log entry to the log file and not care at all about synchronisation.
If I’m wrong, I hope somebody will correct me
Best regards,
Grzegorz N.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs