$pipe
The $pipe variable indicates whether the request is being processed in a pipelined fashion. — NGINX Core (HTTP)
Description
The $pipe variable is used within the NGINX server to determine if a request is being processed via HTTP pipelining. Pipelining is a technique where multiple requests can be sent on a single connection, allowing the client to send additional requests before the previous responses are received. This can improve performance in specific scenarios, particularly for web browsers sending multiple requests to load resources concurrently. The variable is available to be referenced within NGINX configuration files, such as in directives that need to conditionally handle certain requests based on whether they are pipelined or not. When a request is received, NGINX sets the value of the $pipe variable accordingly: it is set to "pipelined" if the request is pipelined, and it is unset (or returns an empty string) otherwise. Typical usage for the $pipe variable involves logging and controlling access or response handling based on whether a request is being pipelined. For instance, you might log different messages for pipelined and non-pipelined requests, or you might apply different caching mechanisms based on the value of this variable.
Config Example
http {
log_format custom_format '[$pipe] $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"';
access_log /var/log/nginx/access.log custom_format;
}Subsystem
httpCacheable
YesContexts
http, server, location, ifPipelining is not supported by all browsers; this could lead to confusion if $pipe is used for significant server logic without proper checks.
If the configuration does not log the value of $pipe explicitly, it may lead to misunderstandings during debugging or performance tuning.