Go] Nginx Series (a) what is--nginx?

Source: Internet
Author: User
Tags epoll

Original blog out of: http://blog.csdn.net/liutengteng130/article/details/46700939 thanks!

First, Introduction

Nginx is a high-performance HTTP and reverse proxy server, also a imap/pop3/smtp proxy Server.

        Nginxweb server / reverse proxy server and e-mail proxy server, and in a bsd -like is issued under the agreement. Developed by the Russian program designer lgor sysoevrambler use. Its characteristic is occupies the memory to be few, the concurrency ability is strong, in fact nginx

Compared with APACHE\LIGHTTPD, Nginx has the advantage of possessing less memory and higher stability, and is famous for its rich module library and friendly and flexible configuration. under the Linux operating system,Nginx uses the epoll event model, and with this,nginx is very efficient under the Linux operating system. At the same time, Nginx uses an efficient event model similar to Epoll on OpenBSD or FreeBSD operating system kqueue.

Second, the noun explanation

Proxy Server

Generally refers to the internal network of the machine through the proxy server to send requests to the Internet server, Proxy Server general role in the client.

Reverse Proxy

The client (user A) sends a normal request to the content in the reverse proxy's namespace (name-space), and thereverse proxy determines where (the originating server) forwards the request and returns the obtained content to the client. While the client always tasks its access to the original server B instead of server Z. Because of the firewall function, only allow the server Z in and out, the firewall and the reverse proxy act together to protect the Yard resource server B.

Purpose: The server behind the firewall is provided to Internet users for access. The reverse proxy can also provide load balancing for multiple servers on the backend, or provide buffering services for servers with slow back-end.

Forward Proxy

A forward proxy is a server (proxy z) located between Client A and the original server (server B) , in order to obtain the content from the original server, user a to the proxy server z Sends a request and specifies the target (server b), then Proxy server Z forwards the request to server B and returns the obtained content to the client. The client must make some special settings to use the forward proxy.

Purpose: The LAN client within the firewall provides access to the Internet. You can also use the buffering feature to reduce network usage.

From a security standpoint:

A forward proxy allows a client to access any Web site through it and hides the client itself, so you must take security measures to ensure that only authorized clients are serviced.

The reverse proxy is transparent to the outside, and the visitor does not know that he is visiting an agent.

Third,Nginx VS Apache

Same point:

1. All HTTP Server Software

2, the function of the modular structure design

3, all support common Language interface, such as PHP,Perl,Python, etc.

4, support forward, reverse proxy, virtual host,URL rewriting, compressed transport,SSL encrypted transmission

Different points:

1,Apache processing speed is very slow, occupy a lot of memory resources

2, function,Apache All modules support dynamic static compilation,Nginx modules are statically compiled

3, the support of Fcgi :Apache support is very bad,Nginx support Very good

4, processing connection mode:Nginx support Epoll,apache not supported

5, Space use:Nginx installation package only hundreds of K

Iv. Advantages of Nginx

1, as a Web server,Nginx processing static files, index files, automatic indexing efficiency is very high

2, as a proxy server,Nginx can achieve non-cached reverse proxy acceleration, improve the speed of the website operation

3, as a load balancer server,Nginx can directly support both Rails and PHP in-house , can also support the HTTP Proxy Server external service, It also supports simple fault tolerance and the use of algorithms for load Balancing

4, in terms of performance,Nginx is specifically designed for performance optimization and development, to achieve a very focused on efficiency. It uses the kernel Poll model, can support more concurrent connections, the maximum can support the response to the number of 5 concurrent connections, and only consumes very low memory resources

5, in terms of stability,Nginx took a phased resource allocation technology, making CPU and memory occupancy rate is very low. Nginx official said,Nginx maintained 1 million inactive connections, and these connections only occupy 2.5MB of memory, so a DOS-like attack on Nginx Basically doesn't have any effect.

6, in the high-availability,Nginx support hot deployment, startup speed is particularly rapid, so you can in the case of uninterrupted service, software version or configuration upgrade, even if run for several months do not need to restart, almost can be done 7x24 Hours running continuously

Nginx has very high stability, support hot deployment; Code quality is very high, code is very standard, the method is mature, module expansion is easy, and some of the latest features of the OS are introduced, such as Sendfile (linux2.2+), Accept-filter(freebsd4.1+), tcp_defer_accept (Linux 2.4+) support, which greatly improves performance.

Go] Nginx Series (a) what is--nginx?

Related Article

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.