New — Iris AI drafts your firewall, routing & rate-limit rules. Explore AI features →
Changelog
Apps

Functions run on Node.js 24, and requests wait while one wakes up

Functions run on Node.js 24. A request that reaches a sleeping or busy function now waits its turn at the edge instead of getting an error page.

Functions run on Node.js 24, and requests wait while one wakes up

A function with nothing to do scales to zero and starts again on its next request. When a crowd arrived while it was starting, some of those visitors could get an error page instead of an answer, and a function at its concurrency limit answered the next request with an error.

Two things changed. Functions run on Node.js 24, and a request that reaches a function while it wakes up, or while it's busy, now waits its turn at the edge.

The contact-form function's Uptime card: forms.example.com is Asleep, and acme-contact-form.ngris.dev has no check turned on
Acme Labs' contact form is a function behind forms.example.com. With no visitors it's Asleep, and its uptime check leaves it that way: the check sees that it's idle and doesn't wake it.
The function's settings: Idle time, Request timeout and Max concurrency, with their help texts
Then the newsletter goes out and a crowd opens the contact page. The first request wakes the function and the others wait for it. Max concurrency sets how many requests it handles at the same time; the rest wait for a free slot, first come, first served.

What changed

  • Node.js 24. Functions run on Node.js 24 LTS, the default runtime. A function created with nodejs20 or nodejs22 runs on Node.js 24 as well.
  • Waking on demand. A sleeping function wakes on its next request. Every request that arrives while it starts waits for that same wake, then goes through.
  • A busy function. Past its Max concurrency, a request waits for a free slot instead of getting an error page.
  • Visitors who leave. A request whose visitor closes the connection drops out of the line, and the wake goes on for everyone else.
  • Still bounded. If the function stays busy, or more requests arrive than the edge can hold for it, a request gets an error page that tells the client to retry.
  • Checks don't wake it. An uptime check of a sleeping function shows Asleep and leaves it asleep.

Get started

  1. In the dashboard, go to Gateway → Applications, open your function and its Function tab to see its runtime.
  2. On the Settings tab, set Max concurrency, and Idle time (0 keeps the function awake), then click Save settings.
  3. Turn on health checks for its endpoint to see Asleep or Up in the Uptime card on the Overview tab.
  4. Read the docs: Serverless functions and Runtimes.

Read the docs

Ask an AI to summarise this page
Deploy
App hosting Edge functions Domains & certificates
Connect
Secure tunnels API gateway Multi-region edge
Protect
Bot protection & challenge WAF & firewall Edge login
Observe & AI
Monitoring Inspector & replay Iris AI MCP server AI Gateway
Developers
Developer tools Docs ngrok policy converter Blog Changelog
Compare
Ngris vs ngrok Ngris vs Cloudflare Tunnel Ngris vs Vercel Ngris vs Netlify Expose localhost guide
More
Solutions Pricing Enterprise Sign in Get Started Free