nginx

  • Gzip against brotli on an API response, measured

    Brotli compresses better and costs more CPU, and whether that is worth it depends on a number nobody measures. The high compression levels are for static assets compressed…

  • An open_file_cache for a site with many small assets

    Serving a static file involves a stat and an open on every request, which is invisible until the file count is large and the disk is network-backed. Caching…

  • Web fonts that stopped blocking the render

    600ms of the largest contentful paint was a font file. font-display: block, and a page that renders in stages.

  • A separate hostname is a separate session

    An admin panel on the same hostname as the customer site shares a cookie namespace, a rate limit and a cross-site scripting blast radius. A cookie scoped to…

  • An admin surface deserves its own rate limit

    A login form is the highest-value endpoint on the site and is usually governed by the same limit as a product page. The proxy caveat is what makes…

  • An admin panel that was a security boundary

    /admin on the same hostname, behind a login form. A support engineer with the same session cookie as a customer.

  • client_max_body_size, and the upload that 413s

    Four separate limits govern an upload and the error message names only the one that fired, which is usually not the one you changed. The PHP limit failing…

  • Caddy gets a certificate without you configuring one

    Automatic certificate management is the default rather than a feature, which removes a category of configuration and a category of outage. The trade is real in both directions:…

  • nginx 1.22 and the HTTP/3 that is still experimental

    1.22 is the stable branch for 2022 and QUIC support is in a separate experimental branch, which is not the same as a feature flag. The distinction matters…

  • map is cheaper than an if inside a location

    if inside a location is evaluated per request and interacts badly with most other directives; map is a hash lookup evaluated once. The map form is also composable…