Post

We cut @nodejs memory in half with a one-line Docker image swap. No code changes. No new APIs. Just smaller heaps. Here's what happened when we tested pointer compression on real workloads 🧵

V8 has had pointer compression since 2020 (Chrome uses it!), but Node.js couldn't enable it — because all worker threads shared a single 4GB memory cage. @Cloudflare sponsored @Igalia to fix it in V8 with a new feature called IsolateGroups.

The fix: each isolate now gets its own 4GB cage. Your main thread gets 4GB, each worker gets 4GB. The old process-wide limit is gone. The Node.js integration by @jasnell is 62 lines across 8 files.

Results: → ~50% memory reduction → 2-4% average latency overhead → p99 and max latency actually improved Smaller heap = shorter GC pauses. For most teams, this is a no-brainer.

What this means for your infrastructure: - 2GB pod limits → 1GB (same perf) - 2x tenant density for multi-tenant SaaS - Edge deployment becomes viable under 128-512MB limits - 2x WebSocket connections per server

Try it, it's one line change: FROM platformatic/node-caged:25-slim Same Node.js, same APIs. Just smaller heaps. Keep in mind that this is an experimental feature.

2 reposts5 likes