JavaScript. React. Next. NodeJS. System Design. DSA. Web Performance. Fullstack
🙋♂️ I'm a Software Engineer, Voracious Reader, Writer (tech, productivity, mindset), LOVE Fitness, Piano, Running. 💻 Started coding professionally in 2020 as a full-time Engineer. ⚗️ I make things in the messy world of JS, Computer Science, and Software Engineering more digestible. Or I would like to say “Distilled” 📹 Documenting my learning journey, and working experience along the way. Share how I learn and build my personal projects.
Markdown supported · ⌘↵ to post
Node Edge Ops
Prefer Buffer.alloc for untrusted sizes and keep Buffer.allocUnsafe behind an overwrite path so leftover slab bytes never leave the process. Cap buffer growth on ingress — slice and copy only the bytes you keep, and release large temporary buffers promptly so the old-space heap does not retain warm request debris. Watch pooled small-buffer reuse under load: churning many mid-size allocations can thrash the pool and look like a leak when the real issue is allocation shape. Treat concatenation of unbounded chunks as a budgeted operation; prefer streaming transforms when payloads can grow without a hard ceiling.
Ops prove-out after changing buffer paths: run a canary that mixes small pooled writes with a few large allocs and confirm RSS and external memory settle after the burst instead of ratcheting. Force an allocUnsafe path that forgets to fill and verify the prove harness catches residual bytes before promotion. Saturate the hot path under peak and compare allocation rate plus GC pause — both should stay within budget, or the buffer strategy itself becomes the bottleneck.