Uncategorized

  • Native lazy loading arrived in core and is filterable

    5.5 adds loading=”lazy” to images in content automatically, which is a good default and is wrong for the first image on the page. Lazy-loading the hero image delays…

  • Backpressure is a design decision, not an accident

    A producer faster than its consumer fills a queue, and what happens when the queue is full is a decision somebody makes — or a decision the infrastructure…

  • Coverage of changed lines, not of the codebase

    Total coverage moves so slowly that it says nothing about the change in front of you, and the question a reviewer has is whether the new code is…

  • Idempotency for an endpoint that takes money

    The client timed out, retried, and the customer was charged twice. A timeout tells the client nothing about what the server did.

  • proxy_cache with stale-while-revalidate and a lock

    A cache that expires and then blocks every waiting request on one slow origin fetch is a cache that makes the worst moment worse. proxy_cache_lock alone removes the…

  • The dual write problem, and why the outbox exists

    Writing a row and publishing an event are two systems, and there is no ordering of the two that is safe. Neither ordering is correct and both are…

  • Dispatching after commit, not inside the transaction

    A job dispatched inside a transaction can be picked up by a worker before the transaction commits, and the worker then cannot find the row it was told…

  • Compose in CI, and the service the tests need

    The tests need MySQL and Redis, and CI gives you an empty machine. Service containers, where they differ from compose, and the readiness nothing does for you.

  • SKIP LOCKED, and the queue table that scales

    Two workers claiming with FOR UPDATE serialise, so adding workers adds no throughput — which is the thing a queue exists to provide. Keeping the transaction short is…

  • A Postman collection belongs in the repository

    A collection in one person’s account is not version control, is not reviewable and disappears when they leave. Exporting and committing means a change to the collection appears…