The Daily
A note a day on APIs and the realities of shipping web applications. Stuff I've actually learned across 25 years of doing the work.
The Laravel Observer Ordering Bug That Only Bites Under Queue Pressure
Model observers and event listeners both feel like the right tool until queues get involved. Here's the subtle ordering bug I kept hitting in production.
Model observers and event listeners solve the same surface-level problem — react when something happens to a model — but they don't behave identically under load, and that difference has burned me more than once. The bug I'm going to describe doesn't show up in , doesn't show up in feature tests with , and doesn't…
Read the daily →Chunking vs. Lazy Collections in Laravel: The Memory Difference That Matters
I ran both approaches against a 4M-row MariaDB table and the numbers weren't even close. Here's what actually happens under the hood.
I've been running a data processing job against a MariaDB table with about 4 million rows — order history for a regional e-commerce client — and I finally sat down to measure the actual memory difference between and . The results surprised me enough that I'm changing how I approach this by default. The short version…
Read the daily →nginx Keepalive Defaults Are Quietly Wasting Your Connections
The nginx defaults for keepalive_requests and keepalive_timeout look fine until you have long-lived API clients hammering your server. Here's what I changed and why.
I spent an afternoon last year chasing phantom 502s on a biotech client's internal API server. Load wasn't high. The upstream Laravel app was healthy. But every few minutes, a handful of requests from their Python data pipeline were dying. The culprit was , and its default value of 1000 — a number that sounds big…
Read the daily →Synthetic Monitoring on a Shoestring: What Ping Checks Miss
A ping check tells you the server answered. It doesn't tell you checkout works. Here's how I script curl chains that actually catch real failures.
Ping checks are a lie you tell yourself. Your monitoring turns green, your phone stays quiet, and somewhere a customer is staring at a blank checkout page because a Redis session store went sideways. I've been burned by this enough times that I don't trust "is the host up" checks for anything that actually matters…
Read the daily →Twilio A2P 10DLC: Why Your SMS Messages Are Silently Disappearing
A2P 10DLC registration is supposed to protect users from spam. In practice, it's a minefield of silent filtering that will make you think your code is broken.
I spent three days last year convinced there was a bug in a Laravel notification channel before I figured out the messages were being delivered — to Twilio — and then silently dropped by the carriers before they ever reached the end user's phone. No error. No webhook. Just gone. That's the A2P 10DLC experience in a…
Read the daily →