原文 : http://www.aosabook.org/en/nginx.html
Nginx架构图
Nginx worker线程数的原则:
General recommendations might be the following: if the load pattern is CPU intensive—for instance, handling a lot of TCP/IP, doing SSL, or compression—the number of nginx worker
s should match the number of CPU cores; if the load is mostly disk I/O bound—for instance, serving different sets of content from storage, or heavy proxying—the number of worker
s might be one and a half to two times the number of cores. Some engineers choose the number of worker
s based on the number of individual storage units instead, though efficiency of this approach depends on the type and configuration of disk storage.
Nginx core 的摘要功能:
The core of nginx is responsible for providing the foundation of the web server, web and mail reverse proxy functionalities; it enables the use of underlying network protocols, builds the necessary run-time environment, and ensures seamless interaction between different modules. However, most of the protocol- and application-specific features are done by nginx modules, not the core.