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 nginx Worker Math That Actually Applies to a Laravel Stack
Most nginx tuning guides throw numbers at you without context. Here's the math I actually use for single-VM Laravel deployments.
Every nginx tuning article eventually tells you to set and and then moves on like that's the end of it. It isn't. Those defaults will get you through a lot, but when something goes sideways under load — and it will — you need to understand the actual math, not just the cargo-culted config. I've tuned single-VM Laravel…
Read the daily →Redis eviction will silently eat your sessions and you won't know why
If you're running Redis on a shared VM with maxmemory-policy set to volatile-lru, your session data is not safe. I learned this the hard way.
Running Redis as both your cache and your session store on the same instance is extremely common. It's also a quiet trap that will eventually log users out at random, corrupt job queues, or drop rate-limit counters — and it will do it in a way that leaves almost no trace in your logs. I hit this on a Laravel…
Read the daily →depends_on Won't Save You: Docker Compose Healthcheck Ordering
depends_on doesn't wait for your database to be ready — it waits for the container to start. That gap has burned me more than once.
Every few months I onboard a new project or spin up a client's existing stack, and within ten minutes I've hit the same silent footgun: the app container starts, tries to connect to Postgres, fails, and either crashes or — worse — silently skips migrations and limps along in a broken state. The culprit is almost…
Read the daily →The Signals That Say Your Single VM Is About to Buckle
By the time your server tells you it's out of headroom, you're already on fire. Here's what to watch before that moment.
I've run more single-server stacks than I can count, and the failure mode is always the same: everything looks fine until it isn't, and by the time a metric pegs 100% you're already explaining an outage to a client. The trick is reading the signals two or three weeks before that moment. This isn't a post about…
Read the daily →Livewire Polling, SSE, or WebSockets: Stop Defaulting to the JS Stack
Before you reach for React and a WebSocket server, ask whether your real-time UI actually needs any of that. Usually it doesn't.
Every time a client asks for a "live" dashboard, I watch the same reflex kick in on every team that hasn't shipped a lot of these: reach for React, add a WebSocket server, wire up Socket.io, and suddenly a three-day feature is a three-week infrastructure project. I've been that person. I'm not anymore. The real…
Read the daily →