Uncategorized

  • Sampling traces at 1% misses the request you care about

    Head-based sampling decides before the request runs, so the eight-second outlier is in the sample only by luck. Tail-based sampling is the correct answer and needs infrastructure that…

  • docker system df, before you buy more disk

    A build host filling its disk is almost always reclaimable space rather than a capacity problem, and the breakdown says which kind. The build cache is usually the…

  • An attribute is not validated until you instantiate it

    Attributes are stored as a name and a list of arguments and nothing constructs them until reflection asks, which makes them cheap and makes the validation later than…

  • A custom cast is the only place a value object belongs

    Converting a column to a value object in an accessor works until something writes to the model, at which point there are two representations and one of them…

  • Preload the font, and only the one you use above the fold

    A preload hint jumps the queue for one resource, and preloading four fonts delays the thing you actually needed first. The crossorigin requirement is the mistake almost everybody…

  • Time-to-start per queue, as a metric

    Queue depth without throughput says nothing: a hundred jobs is fine at fifty a second and an incident at one a minute. Oldest-waiting-age is a direct measure of…

  • An idempotency key comes from the client or not at all

    The server cannot tell two identical requests apart from one request sent twice, because the payload is the same either way — only the client knows which it…

  • A key that is an array index breaks reordering

    A key tells React which element is which between renders, and an index says only “the third one”, which is a different element after a sort. The bug…

  • A healthcheck that tests the app, not the port

    A health check that opens a TCP connection reports healthy for a process that is listening and cannot serve a request. The rule that has held up is…

  • nginx try_files, and the rewrite you did not need

    A front-controller pattern written with if and rewrite works and is slower and harder to reason about than the two-line version. try_files is a single directive evaluated once,…