Home > Backend Development > PHP Tutorial > nginx configuration event configuration nginx apache nginx php nginx rewrite

nginx configuration event configuration nginx apache nginx php nginx rewrite

WBOY
Release: 2016-07-29 08:53:41
Original
1184 people have browsed it

Whether to turn on the accept lock

Syntax: accept_mutex [on|off];
Default: accept_mutex on;
Function: accept_mutex is Nginx's load balancing lock. This lock allows multiple worker processes to take turns and serialize TCP connections with new clients. The accept lock is turned on by default. If you turn it off, it will take less time to establish a TCP connection, but it is not conducive to load balancing, so turning it off is not recommended.

Path of lock file

Syntax: lock_file path/file;
Default: lock_file logs/nginx.lock;
Function: I don’t quite understand.

The delay time between using the accept lock and actually establishing the connection

Syntax: accept_mutex_delay Nms;
Default: accept_mutex_delay 500ms;
Effect: After using the accept lock, only one worker process can obtain the accept lock at the same time. This accept lock is not a blocking lock and will be returned immediately if it cannot be obtained. If only one worker process tries to acquire the lock but fails, it must wait at least the time defined by accept_mutex_delay before trying to acquire the lock again.

Establish new connections in batches

Syntax: multi_accept [on|off];
Default: multi_accept off;
Function: When there is a new connection in the event model, try to establish connections for all TCP requests initiated by the client in this schedule.

Select event model

Syntax: use [kqueue|rtsig|epoll|/dev/poll|select|poll|eventport];
Default: Nginx will select the most appropriate time model
Function: For Linux systems, there are three event-driven models to choose from: poll, select, and epoll. Generally speaking, epoll has the highest performance.

Maximum number of connections per worker

Syntax: worker_connections number;
Function: Define the maximum number of connections that each worker process can handle simultaneously.

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the event configuration of nginx configuration, including nginx content. I hope it will be helpful to friends who are interested in PHP tutorials.

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