Node.js 22 (LTS) — built-in HTTP/HTTPS proxy + percentage memory sizing (urgent for production deployments)

Node.jsDevOpsDockerCloud

Key update

Node.js v22.21.0 (LTS) (released 2025‑10‑20) ships built-in proxy handling for http/https (including fetch) via NODE_USE_ENV_PROXY / --use-env-proxy, a new cli flag to opt into using environment proxy settings, a new shouldUpgradeCallback for fine-grained control of HTTP upgrade handling, and percentage support for --max-old-space-size so memory limits can be expressed relative to available memory. (nodejs.org)

Why it matters

These are small-looking platform changes with outsized operational impact: built-in proxy support removes the need for per-app proxy shims or runtime workarounds when running behind corporate proxies or in restricted networks (client fetch, http.request and Agent now honor env proxies). Percentage-based --max-old-space-size makes Node memory configuration far safer and more predictable in containerized environments (you can set memory caps like 50% instead of hard‑coding MB values), which reduces OOM-driven rollouts and simplifies autoscaling templates. shouldUpgradeCallback gives servers explicit control over WebSocket/upgrade decisions at the HTTP layer, useful for load‑balancer or auth gatekeeping scenarios. Together, these changes reduce fragile platform glue, simplify CI/CD and image builds, and are low‑risk to adopt in staging; teams should add a Node‑22 job in CI, test proxy and memory behavior under representative container memory limits, and then schedule a controlled rollout to production LTS targets (Node 22.x is the active LTS line through its lifecycle). (nodejs.org)

Source

Read Next