[KongchangAI]
· 2 min read· 1,457 words

Netlify Server Launches: Keeping WebSockets and Long-Running AI Tasks Alive

Netlify Server Launches: Keeping WebSockets and Long-Running AI Tasks Alive

Netlify launches Netlify Server, an always-on backend that fills serverless gaps for WebSockets and long-running tasks.

Netlify launched Netlify Server on Product Hunt, providing applications with a backend process that stays alive while users are active, targeting WebSocket connections, multiplayer collaboration, and long-running AI Agent tasks. It supports natural-language description with a built-in Agent or existing Express, Fastify, Hono, and Koa code, gives each preview environment its own backend, scales to zero when idle, and is free during early access. It received 125 votes and ranked 4th.

Netlify has launched Netlify Server on Product Hunt, a new capability that keeps an application's backend alive for as long as users are using it. It directly targets the three types of workloads that traditional serverless architectures struggle with most: long-lived WebSocket connections, multiplayer online collaborative applications, and AI Agent tasks that need time to complete. The product received 125 votes on Product Hunt and ranked 4th, spanning the SaaS, developer tools, and AI categories.

Netlify Server

From "run and gone" to "still running after use"

Serverless's core promise is on-demand execution and scaling to zero when idle, but that promise often becomes a burden in real-time scenarios. WebSockets need connections held open for long periods, multiplayer online games need room state kept in memory, and AI Agents may only return results after several minutes—none of these can be covered by a single function invocation. Netlify Server's approach is straightforward: give the application a backend process that stays alive for as long as users are using it. It keeps WebSocket connections open, holds state in memory, and deploys alongside the project.

This is effectively adding a "stateful runtime" layer on top of Netlify's existing static hosting and function capabilities. It is not meant to replace traditional servers, but rather to consolidate the parts of the logic that need to be always-on into a unit that can be distributed with the project.

Architectural differences between serverless and always-on processes

Traditional serverless (FaaS) uses event-triggered, one-shot functions as its execution unit: an instance starts when a request arrives, and the instance is quickly reclaimed after the response is returned, with the runtime typically not guaranteeing memory persistence across requests. This model is inherently unsuited to workloads that need to maintain connections or session state.

Always-on backends (such as containers or long-running Node.js processes) are the opposite: the process persists for the duration of a user session, and in-memory variables, connection pools, and WebSocket handles can all be reused across requests. The cost is that you need to manage process lifecycle, scaling, and idle reclamation. Netlify Server attempts a compromise: it preserves the programming model of an always-on process while the platform handles scaling and scaling to zero when idle, so developers don't have to run their own server operations.

Two ways to get started: describe and generate, or bring your own framework

Netlify Server offers two paths. The first is to describe your requirements in natural language and have a built-in Agent build the backend directly; the second is to bring your existing Express, Fastify, Hono, or Koa code. The latter is friendlier for existing projects—migration doesn't require rewriting routes and middleware, and the framework ecosystem stays as it is.

Supporting four mainstream Node.js frameworks simultaneously shows that it doesn't intend to lock you into a single stack. For developers, this means getting always-on capabilities within a familiar code structure rather than being forced to learn a new programming model. The built-in Agent code-generation path is more of an entry point for rapid prototypes and lightweight services; the trade-off between the two depends on project complexity.

Every preview environment gets its own backend

One easily overlooked detail that affects workflows: Netlify Server provides each preview environment with its own server. Traditionally, preview deployments often only allow you to validate the frontend, while the backend either shares a staging environment or cannot be integrated for testing at all. Independent backends let reviewers test real-time features directly from a preview link without worrying about polluting the main environment's data.

This design has a clear impact on the iteration pace of multiplayer collaborative products. Room state, connection counts, and in-memory data are isolated between previews, so testing real-time features doesn't require queuing for a shared backend.

Scaling strategy: scale on demand, scale to zero when idle

Netlify Server claims to scale with demand and scale to zero when idle. Together, these two statements point to a pragmatic goal: real-time applications no longer need to pay for idle time. For products with fluctuating usage—such as multiplayer games that are only active during events or collaborative tools used in phases—this elasticity is closer to the actual cost curve than fixed-spec always-on servers.

Of course, scaling to zero also means cold-start issues still exist. For scenarios like WebSockets that require immediate response, whether the latency when the first connection is established is acceptable requires real testing to determine. Netlify is currently offering it free during the early access phase, which lowers the cost of validation.

Cold start and scaling behavior

"Scaling to zero" means the backend process is fully reclaimed when there is no active traffic, and the next request needs to restart the process and initialize the application code—this latency is the cold start. For short HTTP requests, cold start usually adds only a few hundred milliseconds; but for a WebSocket handshake, the client will directly perceive it as slower connection establishment.

In addition, "scaling with demand" is not painless in stateful scenarios: in-memory room state by default exists only in a single instance, and horizontally scaling to multiple instances requires additional state synchronization or sticky routing mechanisms. The "behavior of in-memory state during scaling" mentioned in the article is exactly the key to this issue; when evaluating, you should focus on testing whether new instances lose sessions when scaling out and whether long connections are interrupted when scaling in.

Implications for AI Agent scenarios

Long-running AI Agent tasks are the most interesting direction in this launch. Agent execution often involves multiple rounds of tool calls, external API requests, and preservation of intermediate state, taking far longer than ordinary requests. Putting such tasks in traditional functions easily hits execution time limits; putting them on self-managed servers adds operational overhead. Netlify Server's in-memory state and always-on process happen to match the Agent's need to "remember the intermediate process."

Combined with the Agent capability that generates backends from descriptions, Netlify has effectively created a closed loop of "using AI to build AI backends." Developers describe the Agent service they want, the platform generates and hosts it, and then the always-on runtime supports it through long tasks. Whether this combination can reliably support production-grade Agents still requires more practical verification.

Long-running AI Agent tasks and execution time limits

AI Agents typically consist of a multi-round loop of "plan—call tools—observe results—plan again," and a single task may involve dozens of external API calls, taking anywhere from tens of seconds to several minutes. Most serverless platforms impose hard timeouts on single function executions (commonly from tens of seconds to over ten minutes), after which execution is forcibly terminated and intermediate state is lost.

Always-on processes are not constrained by single-invocation duration and can keep task state (conversation history, tool returns, intermediate variables) in memory and advance as needed. But this also requires the platform to provide process survival guarantees and failure recovery strategies; otherwise, unpersisted state will still be lost when the process is reclaimed. Production-grade Agents usually also need to write critical state to external storage as a fallback.

Worth paying attention to during early access

Netlify Server is currently in early access and free to use, having received 125 votes and ranked 4th on Product Hunt, which shows that developers have a real need for "serverless platforms adding always-on backends." Its value lies not in inventing new concepts, but in packaging WebSockets, in-memory state, independent preview backends, and idle scaling into the existing Netlify deployment workflow.

For teams building real-time collaboration, multiplayer online, or AI Agent products, this is an option worth trying during the early access period. What to watch for is cold-start performance, long-connection stability, and the behavior of in-memory state during scaling—these details determine whether it can move from a prototyping tool to a production environment.

One-line Summary

Netlify launches Netlify Server, an always-on backend that fills serverless gaps for WebSockets and long-running tasks.

Paragraph Summary

Netlify launched Netlify Server on Product Hunt, providing applications with a backend process that stays alive for as long as users are using it, directly targeting the three types of workloads traditional serverless struggles with: long-lived WebSocket connections, multiplayer online collaboration, and long-running AI Agent tasks. The product offers two onboarding paths—describe requirements in natural language and have the built-in Agent generate the backend, or bring existing Express, Fastify, Hono, or Koa code. Each preview environment comes with its own backend server for easier real-time feature integration testing; the scaling strategy is scale on demand and scale to zero when idle, and it is free during early access. The product received 125 votes and ranked 4th on Product Hunt, and its value lies in packaging always-on capabilities into the existing Netlify deployment workflow rather than inventing new concepts.

#Netlify Server#serverless#WebSocket#AI Agent#always-on backend#Express#Fastify#Hono#Koa#scale to zero
Share:

Related articles