Two reordered stacks contain the same CSS and assets regexes; the first matching row is highlighted in each stack for the unchanged assets CSS path.

nginx chooses the first matching regex, not a specificity score

nginx does not assign a general specificity score to every location expression. Ordinary prefixes are selected by matching length, exact locations can finish the search, and competing regex locations are evaluated in declaration order. A regex that looks narrower to a human can lose to a broader expression placed earlier. Mixing these selection rules is a common reason apparently careful routing changes affect unexpected paths. ...

December 27, 2027 · 6 min · XB Field Notes
Upstream and client flank a finite two-part proxy buffer with forward arrows and a return backpressure path; the client path exists before upstream completion.

Response buffering absorbs a speed difference within a resource budget

Response buffering lets nginx read from an upstream while delivering data to a client at another pace. With proxy_buffering on, nginx uses configured memory buffers and can write part of a large response to a temporary file. It need not collect the entire response before sending the first bytes. The available buffering determines how far the two connections can progress independently. ...

December 7, 2027 · 6 min · XB Field Notes
The reported JSON body compresses from 28015 to 246 gzip bytes and decodes back to the exact original 28015 bytes. Shape sizes are schematic.

Enable gzip explicitly, then verify negotiation and decoded bytes

gzip is a response content coding: nginx can send a compressed representation that an accepting client decodes. Enabling it requires gzip on; gzip_types extends the eligible MIME types but does not activate compression by itself. The result depends on the response, request capabilities, and effective configuration. A smaller body is useful only if it still decodes to the intended content. ...

August 29, 2027 · 5 min · XB Field Notes
Requests to /a and /b converge on the same identity zone and client key. In the historical fixture, the first succeeds with 200 and the next is rejected with 429. Location names do not create separate budgets.

A request limit protects the budget named by its key

A request-rate limit applies to the identity expressed by its key, not automatically to a person, account, or endpoint. limit_req_zone stores shared state for those key values, and limit_req applies the zone while handling a request. Two locations using the same zone and key can consume the same budget. Choosing a variable therefore defines a real fairness and enforcement boundary. ...

August 28, 2027 · 6 min · XB Field Notes
An untrusted client claim reaches a replacement boundary; a crossed claim path gives way to the observed peer used at a direct-client edge.

A reverse proxy needs an explicit header trust boundary

A reverse proxy accepts a client connection and makes a separate request to an upstream application. The application’s socket peer is therefore the proxy, while information about an earlier client can arrive through request headers. Those headers are useful only when the deployment defines who may set them and how they are validated. Proxying a request does not automatically make every forwarded identity or scheme claim trustworthy. ...

August 27, 2027 · 6 min · XB Field Notes
The original request /a//b/../c?x=1 points down to current /a/c, with a separate original-retention path preserving the incoming spelling.

nginx matches normalized paths and can select a location again

nginx location matching uses a normalized URI path rather than the untouched request-target text. Percent-encoded characters are decoded, relative path components are resolved, and adjacent slashes can be merged according to configuration. Later processing can change the current URI again and trigger another location search. Understanding both transformations is necessary when a request appears to enter a different handler than its original spelling suggests. ...

August 26, 2027 · 5 min · XB Field Notes
Four historical nginx log-format rows show three failing choices and one successful JSON-escaped format with quoted optional timing.

Structured nginx logs need escaping and a value-type contract

A log_format that resembles JSON is not necessarily a reliable structured event format. nginx substitutes variable values into the text, and those values can contain quotes, backslashes, control characters, or no data at all. Correct string escaping and correct value types are separate requirements. Testing emitted records with a real parser catches failures that a visually convincing configuration or successful nginx -t cannot establish. ...

July 15, 2027 · 6 min · XB Field Notes
Historical nginx fixture: a bypass request returns B while the cached A remains stored; the next ordinary request is HIT A.

An expired cache entry needs a revalidation and stale policy

An nginx proxy cache has several independent decisions: identifying the stored response, deciding whether it may be reused, deciding whether a new response may be stored, and handling an expired copy. Treating those decisions as one TTL setting makes failures difficult to explain. Verify the resulting request path and bytes, not merely that nginx accepts the configuration. ...

June 24, 2027 · 6 min · XB Field Notes