ApacheApache is the world's most used Web server software. It can run on almost all widely used computer platforms and is one of the most popular Web server-side software due to its widespread use across platforms and security. Apache originates from the NCSAHTTPD server and has been modified many times to become one of the most popular Web server software in the world. Apache is taken from the "a patchy server" pronunciation, meaning is full of patches of the server, because it is free software, so constantly someone to develop new features, new features, modify the original flaw. Apache is characterized by simple, fast, stable performance, and can be used as a proxy server. So far, Apache is still the most used Web server in the world, with a market share of about 60%. Many of the world's most famous sites such as Amazon, Yahoo!, W3 Consortium, Financial Times, etc. are the product of Apache, its success lies mainly in its source code open, there is an open development team, Supports cross-platform applications (which can run on almost all UNIX, Windows, Linux system platforms) and its portability.features of Apache:1) can be run on almost all computer platforms. 2) support for the latest http/1.1 protocol 3) Simple and powerful file-based configuration (httpd.conf). 4) Support for Universal Gateway Interface (CGI) 5) supports virtual hosts. 6) Support HTTP authentication. 7) Integrated Perl. 8) Integrated Proxy Server 9) You can monitor the status of the server through a Web browser, and you can customize the log. 10) Support server-side include command (SSI). 11) Support Secure Socket Layer (SSL). 12) have the ability to track the user's conversational process. 13) Support fastcgi 14) Support Java ServletsNginxNginx is a very lightweight HTTP server written by Russians, it is pronounced "engine X", is a high-performance HTTP and reverse proxy server, but also a IMAP/POP3/SMTP proxy server. Nginx was developed by the Russian Igor Sysoev for the second rambler.ru site of Russian traffic. Nginx is written in an event-driven manner, so it has very good performance and is also a very efficient reverse proxy, load balancing. It has the performance of matching lighttpd, and there is no lighttpd memory leak problem, and lighttpd Mod_proxy has some problems and has not been updated for a long time. However, Nginx does not support CGI operations because it reduces some of the procedural vulnerabilities that can be caused. Therefore, you must use the FastCGI method to execute the PHP program. Nginx as an HTTP server, has the following basic features: processing static files, index files and automatic indexing; Open file descriptor buffering. No caching of reverse proxy acceleration, simple load balancing and fault tolerance. FastCGI, simple load balancing and fault tolerance.Nginx is specially developed for performance optimization, and performance is the most important consideration, and the implementation is very focused on efficiency. It supports the kernel poll model, withstands high loads, and reports that it supports up to 50,000 concurrent connections. Nginx has a highStability。 Other HTTP servers, when encountering spikes in access, or when someone maliciously initiates a slow connection, are likely to cause the server to run out of physical memory frequently, lose response, and only restart the server. For example, once Apache has reached more than 200 processes, the Web response is significantly slower. And Nginx took the pointsPhase Resource Allocation technology, making it very low CPU and memory usage. Nginx official said to maintain 10,000 inactive connections, it only accounted for 2.5M of memory, so a DOS-like attack on Nginx is basically useless. In terms of stability, Nginx is better than lighthttpd. Nginxsupport for hot deployment。 Its start-up is particularly easy, and it can be run almost 24x7, even if it runs for several months without restarting. You will also be able to upgrade the software version in the event of uninterrupted service. The Apache and Nginx contrast nginx response performance is very good relative to apache:1 and high concurrency. (single million-level concurrent connection 30000-50000/s (simple static page)) 2, reverse proxy performance is very good. (available for load balancing) 3, low memory and CPU usage. (For Apache 1/5-1/10) 4, the function is less than Apache (common functions are) 5, to PHP can use CGI mode and fastcgi mode, no module compiled loading mode. Someone through the performance test comparison (Nginx and Apache comparative analysis), the conclusion: Nginx as a simple Web server, that is, static content, performance is better than Apache, especially can withstand the pressure, bandwidth and resource consumption is better than Apache. Nginx as a simple Web server, that is, put static content, performance is better than Apache, especially can withstand the pressure, bandwidth and resource consumption is better than Apache. Many large sites like to put Nginx on the front, Apache as the back end.
Features of Nginx and Apache advantages and usage scenarios