the difference between Apache, Nginx, Tomcat, and PHP
Apache and Nginx are two of the most powerful Web services software on the market.
Advantages of Apache:
Multi-support module, multi-function
High stability of operation
Support for PHP modules, without the need to install other redundant components can be implemented. PHP Dynamic page parsing
Address rewriting feature (rewrite) powerful
The advantages of Nginx:
Powerful anti-concurrency capability
Consumes less host resources
Non-blocking Async functionality
The difference between the Apache and the Nginx:
Async capability: There are asynchronous modules in Apache, which support asynchronous functions, but are blocking async, and nginx is non-blocking asynchronous.
Multiple concurrency: Nginx because the software volume is small, asynchronous function, so consumes less host resources, anti-concurrency capability is more than 3 times times Apache.
Stability: Apache is an established Web services software, long development time, fewer bugs, more trustworthy than Nginx.
Blocking and non-blocking async:
Blocking Async: Browser request page, proxy server foreground build thread, Fetch page data from Web server back to browser, proxy server will process the next request completely. The front-desk request needs to be queued for processing and a blocking condition occurs.
Non-blocking Async: The browser request page, the proxy server suspends the thread, waits for the paging data from the Web server to be returned to the browser, the proxy server suspends the request, and the request begins processing the next request before it has finished processing. The foreground queue processing request blocking issue does not occur.
Tomcat is a derivative product of Apache, and it is aimed at parsing. JSP dynamic page development of a software, and it also supports parsing HTML static pages. It is itself a Web service software, we can also use it to publish Web sites, but with Apache and nginx it is not very outstanding, relative as a Web service, it does not have too many modules and functions, so it is generally used only for the backend. JSP dynamic page parsing.
PHP is a component that enables Web services to resolve to a. PHP dynamic page. It does not publish the functionality of the site itself.
The difference between Apache, Nginx, Tomcat, and PHP