N
N
MASTER PROCESS
Child Processes
Shared memory is used for cache, session persistence, rate limits, session log
CM CL W W W W
WEB, EMAIL
STREAM STATE HTTP STATE MAIL STATE
and
TCP traffic MACHINE MACHINE MACHINE
INTERNET REQUESTS
Log
Access and
session log
Identify
Configuration Block
Request matching and rewriting
Perform Authentication
Internal and external
access control
Generate Content
Generate response locally, or
proxy/gateway to an upstream service
Upstream Services
HTTP, HTTPS, FastCGI, uWSGI, SCGI, memcached
Most web application platforms use blocking (waiting) I/O NGINX uses a Non-Blocking “Event-Driven” architecture
Listen Sockets (port 80, 443, etc) Listen Sockets & Connection Sockets
Each worker can only process one active connection at a time An NGINX worker can process hundreds of thousands
of active connections at the same time
W W W W W W
W W W W W W
W W W W W W W W