HTTP variables
$upstream_last_addr variable (HTTP)
Address of the final selected backend, including the UNIX socket case. Unlike upstream_addr this identifies the last selected peer rather than the attempt history. Version: 1.29.3. Commercial subscription; avoid exposing internal topology. No positional arguments. Example: partial http configuration for a disposable synthetic lab; not a complete deployment.
Formal Syntax & Structure
nginx syntaxnginx
$upstream_last_addrWorking Example
Example Snippetnginx
# Classify presence without emitting raw backend metadata.map $upstream_last_addr $lab_seen_upstream_last_addr { "" absent; default present;}