How nginx processes a TCP/UDP session

A TCP/UDP session from a client is processed in successive steps called phases :

Post-accept

Pre-access

Access

SSL

Preread

Content

  • Mandatory phase where data is actually processed, usually proxied to upstream servers, or a specified value is returned to a client.

Log

  • The final phase where the result of a client session processing is recorded. The ngx_stream_log_module module is invoked at this phase.