Skip to content

nginx: the less strict list names four more differences, an env tag asks process.env once for each traced request, and under connection the auth check is told the connection's scheme - #69

Merged
tudor-pop merged 1 commit into
masterfrom
65-nginx-less-strict-and-tracing-memory
Nov 20, 2026

Conversation

@tudor-pop

Copy link
Copy Markdown
Contributor

Closes #65

What changes

The lists render counts. The ticket's three differences were measured on nginx 1.30.6 and 1.31.8 beside Envoy 1.40.2, and each holds. They are named, not corrected: the nginx output keeps nginx's own behaviour.

  • nginx's list goes from 15 to 19 entries: the admin listener answers an absolute request target; an https target sent over plain HTTP is served under client_address: connection; a tab at either end of a header's value reaches the service (any header, not only x-request-id and User-Agent); and, found on the way, under forwarded an X-Forwarded-Proto that is neither http nor https is told to the auth check as it arrived.
  • HAProxy's list gains that last entry and has 11.

Memory under tracing. The cause is found and removed. proxyfile.js asked process.env with hasOwnProperty before it read an env tag's variable, in each traced request. It now reads the variable and takes it when it is a string, which is equal in behaviour for every name a file can give.

At 1,000 traced requests a second, 300 s, asked by address Held at 300 s
nginx 1.31.8, the script of 2.2.0 523.5 MiB (median of three runs, 520.9 to 524.5)
nginx 1.31.8, this change 222.7 MiB (one run)
nginx 1.30.6, this change 175.7 MiB (one run)

Why that call held memory outside the script's heap is not known; the page says so, and says which of its other figures were measured before this change.

The scheme the auth check is told. With auth.send_request: true and client_address: connection, the nginx output told the check the scheme of an absolute request target. Measured: GET https://localhost/products/1 HTTP/1.1 sent over plain HTTP was served, and the check read x-forwarded-proto: https, against what docs/auth.md says for connection. The check is now told the connection's scheme. Under forwarded nothing changes.

The battery.

  • Rows for an env tag whose variable is set, and for a set variable whose name every object inherits.
  • A plain connection file and rows for the scheme each proxy tells the check: an absolute target, an HTTP/2 :scheme, a client's own header, and an X-Forwarded-Proto of ftp.
  • Before any container starts, the battery counts the rows each entry is about to run and fails when docs/conformance.md gives another number. The page had gone stale by hand; it now says 11,165 rows in all.

Found and not corrected here

The Envoy output tells the check https for an HTTP/2 request sent over plain HTTP with :scheme: https under client_address: connection (the service is sent http). The battery holds that row with Envoy's own literal and docs/auth.md says it plainly. It gets a ticket of its own, with HAProxy's plain connection case, which no row measures yet.

Checks

  • The whole conformance battery ran once at this tree before the pull request opened and passed.
  • gofmt, go vet (also with the conformance tag), go build, and the tests of the changed packages pass; the generated pages and examples are current.
  • Each new count test and each new row that can fail was seen failing first.
  • One independent review before the pull request opened, with one round of corrections, and one short security review of the scheme change alone.

For the next release's notes

Every nginx file is rendered again (its proxyfile.js changes). A file with auth.send_request: true and client_address: connection also gets a new nginx.conf.

…sks process.env once for each traced request (222.7 MiB where 2.2.0 held 523.5), and under connection the auth check is told the connection's scheme (Part of #65)

The list of the ways the nginx output is less strict than the Envoy output goes from 15 to 19 entries, each measured
on nginx 1.30.6 and 1.31.8 beside Envoy 1.40.2: the admin listener answers an absolute target, an https target sent
over plain HTTP is served under client_address connection, a tab at either end of a header's value reaches the
service, and under forwarded an X-Forwarded-Proto that is neither http nor https is told to the auth check as it
arrived. HAProxy's list gains the last one and has 11.

The tracing script asked process.env with hasOwnProperty before it read an env tag's variable, in each traced
request. It now reads the variable and takes it when it is a string, which is equal for every name. At 1,000 traced
requests a second for 300 s, nginx 1.31.8 holds 222.7 MiB where it held 523.5 (median of three runs), and nginx 1.30.6
holds 175.7. Why that call held memory outside the script's heap is not known, and the page says so.

With auth.send_request and client_address connection, the nginx output told the check the scheme of an absolute
request target, so an https target sent over plain HTTP made the check read https. It now tells the check the
connection's scheme, as docs/auth.md says. Under forwarded nothing changes.

The battery runs env tags whose variable is set, and the scheme each proxy tells the check for an absolute target, an
HTTP/2 :scheme and a client's own header. Before any container starts it counts the rows each entry is about to run
and fails when docs/conformance.md gives another number.
@tudor-pop
tudor-pop merged commit 0986680 into master Nov 20, 2026
1 check passed
@tudor-pop
tudor-pop deleted the 65-nginx-less-strict-and-tracing-memory branch November 20, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nginx: memory under a fully traced load, and three request forms nginx answers otherwise than Envoy

1 participant