Vercel's Fluid Compute model addresses the serverless database connection leak problem by leveraging `waitUntil` to keep functions alive long enough to close idle connections before suspension. This ensures proper connection lifecycle management, similar to serverful environments, with minimal cost implications due to Active CPU Pricing. Best practices include configuring low connection idle timeouts, defining pools globally, avoiding a maximum pool size of 1, and utilizing rolling releases.
2025
The real serverless compute to database connection problem, solved
8/13/2025
Introduces the problem of serverless function suspension leading to database connection leaks and presents Vercel Fluid Compute's `waitUntil` feature as a solution. Details the algorithm for using `waitUntil` to close idle connections before suspension and explains the minimal cost implications with Active CPU Pricing. Provides best practices for database connection pool management in serverless and serverful environments.
Fluid compute: How we built serverless servers
7/28/2025
This post details the foundational work of building a custom TCP-based transport layer to enable streaming responses from AWS Lambda, which evolved into the ability to multiplex multiple concurrent requests to the same Lambda instance, breaking the traditional one-invocation-per-instance model. A new service, `compute-resolver`, was built to coordinate routing requests to Vercel Function Router pods, increasing the chances of reusing existing TCP connections and preventing hot-spotting.
Designing and building the Vercel Ship conference platform
6/11/2025
This post details the engineering behind the Vercel Ship conference platform, highlighting the use of Next.js, Postgres, and Payload CMS. It showcases how Vercel's platform, including Fluid Compute, ISR, Partial Prerendering, and the `use cache` directive, was used to build a fast and editable conference experience. The use of AI for visual prototyping and v0 for UI generation is also discussed, along with the development of modular, themeable components using shadcn, Geist, and cva.
Fluid compute: Evolving serverless for AI workloads
5/30/2025
This post introduces Fluid compute, a new serverless compute model specifically designed for AI workloads. It details how LLM interactions differ from traditional web app transactions due to their sequential nature and extended execution times. Fluid compute addresses this by reusing existing compute capacity before scaling, allowing a single instance to process multiple AI inference requests. It also highlights the security benefits, including Vercel Firewall integration and secure instance architecture, and its reliability features like multi-zone and multi-region failover. The post announces that Fluid compute is now the default for new projects.
How Fluid compute works on Vercel
3/3/2025
This post details how Fluid compute works on Vercel, focusing on the Vercel Functions router's role in coordinating function execution. It explains how the router dynamically assigns requests to instances based on real-time metrics, enabling instances to process multiple concurrent requests. The architectural pattern of instances communicating exclusively through the router via persistent TCP tunnels is highlighted for enhanced security and control. The request lifecycle is broken down into routing, security, and caching; compute selection and execution (prioritizing in-flight and pre-warmed instances); processing and response optimization (including streaming); and adaptive scaling. The cost reduction benefits of Fluid compute, up to 85%, are also emphasized.
Introducing Fluid compute: The power of servers, in serverless form
2/4/2025
This post introduces Fluid compute as Vercel's evolution beyond traditional serverless, offering a new model for web application infrastructure. Key principles include compute triggering only when needed, real-time scaling from zero to peak traffic, prioritizing existing resources before scaling new ones, billing based on actual compute usage, pre-warmed instances for reduced latency, and support for advanced tasks like streaming and post-response processing. It details how Fluid achieves smarter scaling with higher ceilings and better cost efficiency by prioritizing existing resources and mitigating uncontrolled execution risks. Cold start prevention is achieved through reduced frequency and softened impact, accelerated initialization with a Rust-based runtime, and bytecode caching. Support for advanced tasks is enabled by extending invocation lifecycles with `waitUntil`. The post also highlights dense global compute and multi-region failover, and emphasizes the open, portable, and fully supported nature of Fluid compute with Node.js and Python runtimes.
2024
Improved infrastructure pricing
4/4/2024
This post details Vercel's updated infrastructure pricing, which introduces more granular metrics for bandwidth and functions. It breaks down bandwidth into 'Fast Data Transfer' and 'Fast Origin Transfer', and functions into 'Function Invocations' and 'Function Duration'. New metrics like 'Edge Requests' and 'Data Cache Reads/Writes' are also introduced. The pricing changes aim to reduce costs for the majority of customers, align with industry standards, and provide new primitives for easier optimization. It also highlights existing features that help prevent runaway spend.