Uncategorized

  • never as a return type, on a router that always aborts

    A helper that throws an HTTP exception was typed void, so every caller had to write an unreachable return statement to satisfy the analyser. never means the function…

  • Blue-green on one host, which is two directories

    The pattern does not require two machines, a load balancer or an orchestrator — it requires two copies and a pointer. mv -T on a symlink is atomic…

  • The API gateway that was an nginx config

    Two services behind one hostname, with a routing table that somebody wanted to solve with a gateway product. A gateway earns its place when routing is dynamic, when…

  • The ubiquitous language that stopped at the ORM

    The domain layer talked about a consignment, the database called it a shipment, and both terms appeared in the same conversation with different meanings. Renaming the table was…

  • The REST response we cached at the edge

    A public REST endpoint serving the same payload to everybody, hit forty thousand times a day, and generated forty thousand times. WordPress sends no-cache on REST responses by…

  • 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…

  • WeakMap for a cache that must not keep objects alive

    A per-request memoisation cache keyed by object was holding every entity loaded during a long-running command, and the command was using 900 MB by the end. This only…

  • A systemd restart policy that hid a crash loop

    A worker that had been restarting every 40 seconds for eleven days, reported as active by every check that looked. Restart=always with no burst limit converts a hard…

  • Corepack, and the package manager version in the repo

    Two developers on different package manager versions produce lock file churn that looks like a real diff and is not. One line in package.json removes an entire category…

  • The effect that ran twice, and the cleanup that fixed it

    Development mode mounting, unmounting and remounting every component is a diagnostic, and the double-fetch it produces is the diagnosis rather than the bug. An effect that cannot survive…