Home > Operation and Maintenance > Nginx > What is the role of nginx

What is the role of nginx

青灯夜游
Release: 2019-06-18 10:50:31
Original
32518 people have browsed it

Nginx is a lightweight web server/reverse proxy server and email (IMAP/POP3) proxy server, released under the BSD-like protocol. Its characteristics are that it occupies less memory and has strong concurrency capabilities. In fact, nginx's concurrency capabilities do perform better among web servers of the same type. Most websites in mainland my country use nginx.

What is the role of nginx

The role of Nginx:

1. As a Web server: Compared with Apache, Nginx uses fewer resources and supports more More concurrent connections reflect higher efficiency, which makes Nginx especially popular with virtual host providers. Able to support responses of up to 50,000 concurrent connections. Thanks to Nginx for choosing epoll and kqueue as the development model

2. As a load balancing server: Nginx can directly support Rails and PHP internally, as well as Serves the outside world as an HTTP proxy server. Nginx is written in C, and its system resource overhead and CPU usage efficiency are much better than Perlbal.

3. As a mail proxy server: Nginx is also a very excellent mail proxy server (one of the earliest purposes of developing this product is also as a mail proxy server). Last.fm describes the successful and wonderful use experience .

Nginx advantages:

1. As a web server, Nginx handles static files and index files, and the efficiency of automatic indexing is very high.

2. As a proxy server, Nginx can implement cache-free reverse proxy acceleration and improve website running speed

3. As a load balancing server, Nginx can not only directly support Rails and PHP internally, but also support HTTP proxy servers for external operations. service, and also supports simple fault tolerance and utilization of algorithms for load balancing

4. In terms of performance, Nginx is specially developed for performance optimization, and its implementation pays great attention to efficiency. It adopts the kernel Poll model, which can support more concurrent connections, can support responses to a maximum of 50,000 concurrent connections, and only takes up very low memory resources

5. In terms of stability, Nginx adopts The phased resource allocation technology makes the CPU and memory usage very low. Nginx officials stated that Nginx maintains 10,000 inactive connections, and these connections only occupy 2.5MB of memory. Therefore, attacks like DOS have basically no effect on Nginx.

6. In terms of high availability, Nginx supports hot deployment and the startup speed is very fast. Therefore, the software version or configuration can be upgraded without interrupting the service. There is no need to restart even if it runs for several months, and it can be done almost 24 hours a day, 7x7. Run

7. Nginx installation is very simple, the configuration file is very concise (it can also support perl syntax), and the server with very few bugs: Nginx is particularly easy to start and can run almost 7*24 without interruption. No need to restart even if it runs for several months.

For more nginx-related technical knowledge, please visit the nginx Getting Started Tutorial column to learn!

The above is the detailed content of What is the role of nginx. For more information, please follow other related articles on the PHP Chinese website!

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