Blog
Tutorials, guides, and insights to help you become a better developer.
Most Node.js services drop in-flight requests on every deploy. Here's the complete pattern: SIGTERM handling, HTTP draining, queue cleanup, and Kubernetes integration.
AdminJuly 24, 202610 min read
Build a pub/sub system from 60 lines of JavaScript: subscribe, publish, unsubscribe, once(), namespace wildcards, error isolation, and async publish.
AdminJuly 22, 20266 min read
Awaiting four independent API calls in sequence instead of parallel can triple your endpoint latency. Here's the pattern, the math, and how to catch it in review.
AdminJuly 20, 20265 min read
You've read "Node.js is single-threaded and non-blocking." Fine. But that sentence raises more questions than it answers. If it's single-threaded, who's doing the file I/O while your JavaScript runs?
AdminJuly 17, 20268 min read
If you're still writing pages/api/... files in a new Next.js project, stop. Route Handlers are the App Router's replacement, and they're meaningfully better — typed, streaming-capable, and built on the same Web platform APIs that Cloudflare.
AdminJuly 15, 20267 min read
Strip Express and Koa down to their core: a 30-line compose() function that chains async middleware with before/after hooks, short-circuit support, and error propagation.
AdminJuly 13, 20265 min read
`forEach` doesn't return a Promise, so `await` before it resolves instantly. Every async callback fires and is forgotten — this is how batch processors ship broken.
AdminJuly 10, 20265 min read
Your user-facing API is fine. REST, JSON, OpenAPI docs — it works, everyone can call it, no complaints. But internally, your Order service is calling the Inventory service 40 times per request.
AdminJuly 8, 202610 min read
You have 200 images to resize. The resize API is fast, but it throttles at 10 concurrent requests. If you throw Promise.all(images.map(resize)) at it, you'll blast all 200 simultaneously, collect a pile of 429s, and watch your retry logic.
AdminJuly 6, 20265 min read