AMAhmed Mahmoudinengahmed.hashnode.dev·21h ago · 9 min readWhy My Node Process Kept Growing: Field Notes on Heap Snapshots, Module-Scope Caches, and Leaks That Only Appear When Instances Are Reused 016cc7Headline: A Node.js process whose memory climbs for hours is almost never leaking inside a request handler — it is leaking at module scope, where a reference outlives the request that created it. What00
AMAhmed Mahmoudinengahmed.hashnode.dev·1d ago · 8 min readWhy My CDN Cache Never Hit: Field Notes on Cache-Control, s-maxage, and stale-while-revalidate a384d9Headline: A CDN that reports a miss on every request is almost never misconfigured at the CDN — the response itself is telling it not to cache. The three changes that fixed my hit rate were removing a00
AMAhmed Mahmoudinengahmed.hashnode.dev·2d ago · 10 min readWhy My Fonts Caused Layout Shift: Field Notes on next/font, size-adjust, and Arabic Fallback Metrics 4ddd49Headline: Font-driven layout shift is a metrics mismatch, not a download-speed problem — the fallback font the browser paints first occupies a different box than the webfont that replaces it. next/fon00
AMAhmed Mahmoudinengahmed.hashnode.dev·3d ago · 9 min readWhy My Package Broke in a CommonJS App: Field Notes on require(esm), the exports Map, and the Dual Package Hazard 0e2a8dHeadline: Node.js 22.12 and later can require() a synchronous ES module, which removes the original reason most libraries shipped two builds, but it does not remove the dual package hazard and it does00
AMAhmed Mahmoudinengahmed.hashnode.dev·Oct 7 · 9 min readWhy My LLM Feature Cost More Than It Should: Field Notes on Prompt Caching, Cache Breakpoints, and the Timestamp That Killed Every Hit ae7c4dHeadline: Prompt caching saves money only when the cached prefix is byte-identical across requests, and a single interpolated timestamp in a system prompt is enough to make every call a cache write in00