String.replace with a string pattern replaces the first occurrence only, which is the most surprised anybody has been by a standard library method. Escaping user input to build…
A composite index serves any query using a leftmost prefix of its columns, which means three separate indexes are frequently one index somebody did not notice. The gap…
Every API invents an error envelope, and RFC 7807 is a perfectly good one that client libraries already understand. type is the field a client should branch on…
Five sequential API calls of 180 milliseconds each is nine hundred milliseconds of a request spent waiting, and they had no dependency on each other. Naming the requests…
Three retries per caller sounds modest and means four times the load on a struggling dependency, which is the opposite of what a retry is for. A budget…
An index containing every column a query needs answers it without reading the table, which on a wide row is the difference between one page read and two.…
A failed job stops at the failing step, so the upload step that would have captured the screenshots never runs. if: failure() is the one that belongs on…
Exponential backoff spreads a single client’s retries over time and does nothing about a thousand clients retrying in lockstep after one outage. The recovering-service failure is the one…
SKIP LOCKED lets several workers claim different rows from one table without blocking each other, which is what makes a database usable as a queue. This is genuinely…
A load balancer, an orchestrator and a monitoring system each want a health endpoint, and two services answering differently is two integrations. Excluding third-party dependencies is the rule…