Nginx configuration of the event configuration Nginx apache nginx php nginx rewrite

Source: Internet
Author: User
Whether to open the accept lock

Syntax: Accept_mutex [On|off];
Default: Accept_mutex on;
Function: Accept_mutex is the load balancer lock of Nginx. This lock allows multiple worker processes to rotate and serialize the TCP connection to the new client. The accept lock is turned on by default, and if it is turned off, it will take less time to establish a TCP connection, but not for load balancing, so it is not recommended to shut down.

The path to the lock file

Syntax: Lock_file path/file;
Default: Lock_file Logs/nginx.lock;
Role: not very understanding.

Delay between the use of accept locks and the actual establishment of a connection

Syntax: Accept_mutex_delay Nms;
Default: Accept_mutex_delay 500ms;
Function: After using the accept lock, only one worker process can fetch the accept lock at the same time. This accept lock is not a blockage lock and returns immediately if not taken. If only one worker process attempts to take a lock and not fetch it, he will at least wait for the time defined by Accept_mutex_delay to attempt to take the lock again.

Bulk build new connections

Syntax: multi_accept [On|off];
Default: Multi_accept off;
Role: When the event model has a new connection, make the connection to all TCP requests initiated by the client in this schedule as much as possible.

Select Event Model

Syntax: use [kqueue|rtsig|epoll|/dev/poll|select|poll|eventport];
Default: Nginx will choose the most appropriate time model
Role: For Linux systems, the choice of event-driven models are: Poll,select,epoll three, in general, Epoll is the highest performance.

Maximum number of connections per worker

Syntax: worker_connections number;
Role: Defines the maximum number of connections that each worker process can process at the same time.

'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
  • '). Text (i)); }; $numbering. FadeIn (1700); }); });

    The above describes the Nginx configuration of the event configuration, including the nginx aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.