BlogsVercelEdge Runtime

Edge Runtime

Edge Runtime

13
posts
2022–2026

Vercel's platform now supports stable HTTP response streaming for Edge Runtime and Node.js Serverless Functions, enabling incremental data delivery. This is achieved through a custom solution on AWS Lambda that bridges the response stream to the invocation service. Read.cv leverages Edge Functions to deliver personalized content from a location close to their users, decreasing latency and improving performance. Vercel OG Image Generation leverages Edge Functions and WebAssembly with a new core library (`@vercel/og`) to convert HTML/CSS into SVGs for dynamic social card images, offering a 5x improvement in P99 TTFB and 5.3x in P90 compared to the previous Chromium-based Serverless Function approach. This new system is lightweight, affordable, and fast, supporting basic CSS, framework-agnostic use, and font/emoji subsetting. It also includes Tailwind CSS support via the `tw` prop and automatically adds Cache-Control headers for edge caching. The system was tested at Next.js Conf, generating over 100,000 tickets on average in 800ms.

2026

What is Edge Runtime

4/24/2026

Introduces the Edge Runtime, a new runtime environment for edge computing. It is designed for framework integration, compliant with WinterCG standards, and offers a subset of Node.js APIs. In production, it uses the V8 engine, excluding Node.js APIs. Local development polyfills Web APIs for Node.js compatibility. Documentation links are provided for API exploration, project integration, and testing with Jest/Vitest.

2025

Scale to one: How Fluid solves cold starts

9/18/2025

This post introduces 'scale to one' as a strategy to keep at least one function instance warm, preventing first-visitor cold starts. It also details how Fluid compute reuses existing instances for multiple requests, reducing the number of cold starts. Predictive scaling is also mentioned as a method to warm instances ahead of demand. The post quantifies the reduction in cold starts to less than 1% of requests.

Introducing Active CPU pricing for Fluid compute

6/25/2025

Introduces Active CPU pricing for Fluid compute, a new pricing model that charges for CPU only when code is actively executing. This model aims to further optimize costs for I/O bound workloads with high idle times, such as AI inference. The pricing is based on three metrics: Active CPU (milliseconds of vCPU usage), Provisioned Memory (GB-hours), and Invocations. This builds upon the existing Fluid compute model which intelligently orchestrates compute across invocations to eliminate cold starts and reuse idle time.

2024

Update regarding Vercel service disruption on August 7, 2024

8/9/2024

Details an incident where an upstream provider for Edge Middleware and Edge Functions caused a 26-minute outage due to an erroneous configuration state. Vercel mitigated the issue via a config override and is implementing future mitigations including improved configuration management with the provider, developing a backup option for Edge Middleware/Functions, and unifying the compute subsystem for Edge, Edge Middleware, and Serverless Functions.

Introducing bytecode caching for Vercel Functions

6/3/2024

Introduced experimental bytecode caching for Vercel Functions to reduce cold start latency. This involves caching the compiled JavaScript bytecode generated by the V8 engine, which is then re-used on subsequent cold starts. The implementation overcomes limitations of ephemeral file systems in serverless platforms by developing a custom solution that continuously improves the cache with traffic. Tested with Next.js applications, showing significant improvements in TTFB and billed duration. Opt-in via `USE_BYTECODE_CACHING=1` environment variable for Node.js 20 and CommonJS. Future support for ES Modules is planned.

2023

Streaming from serverless Node.js and Edge Runtime on Vercel

3/28/2023

This post details Vercel's custom solution for enabling HTTP response streaming on AWS Lambda, which lacks native support. It explains the request flow through the Edge Location and Serverless Function Invocation Service, the modification of requests with callback URLs, and the use of a bridge code within Lambda to establish a secure socket connection for transferring the response stream back to the invocation service for client delivery. This significantly reduces TTFB and FCP by allowing incremental data processing.

Build a GPT-3 app with Next.js and Vercel Edge Functions

2/1/2023

This post details the implementation of a GPT-3 application using Next.js for the frontend and a backend API route. It explains the frontend components, state management, and the API call to OpenAI. The backend API route is shown to construct a payload for OpenAI's GPT-3 model and send a POST request. The post also provides historical context, recommending Vercel Functions with Fluid compute and streaming for new projects instead of the Edge Functions approach demonstrated.

Near-zero latency using Vercel Edge Functions | Customers | Vercel

1/13/2023

This post details how Read.cv utilized Vercel's Edge Functions to achieve near-zero latency for personalized content delivery, significantly improving their global customer base's user experience. It highlights the benefits of edge deployment for speed and the flexibility of serving some pages from the edge while others are pre-generated static assets within the same Next.js and Vercel toolkit. The post also mentions Vercel's support for wildcard domains, automatic SSL cert generation, and DNS management for multi-tenant platforms.

Sanity balances experimentation and performance with Vercel Edge Middleware | Customers | Vercel

1/13/2023

Sanity leverages Vercel's Edge Middleware for A/B testing and personalization, demonstrating its capability to run experiments without disrupting the client experience and to collaborate on personalization efforts.

2022

Vercel Edge Functions

12/15/2022

This post announces the General Availability (GA) of Vercel Edge Functions. It highlights performance optimizations, support for `cache-control` headers, regional preference for functions, WebAssembly support, and increased function size limits for Pro and Enterprise customers. It also discusses the future direction of Edge Functions, aiming for better compatibility with Node.js APIs and improved observability. Pricing details are provided, and a note advises using Vercel Functions and Fluid compute for new projects.

Colocate your edge to your data on Vercel

10/20/2022

Introduced regional execution for Edge Functions, allowing developers to specify the execution region. This capability aims to colocate compute resources with data sources to avoid latency waterfalls, especially when databases are not globally distributed. The post contrasts this with global deployment and highlights the trade-offs for data fetching scenarios.

Introducing OG Image Generation: Fast, dynamic social card images at the Edge

10/10/2022

Introduced Vercel OG Image Generation, a new library (`@vercel/og`) for generating dynamic social card images. This system leverages Vercel Edge Functions and WebAssembly, converting HTML/CSS into SVGs via the Satori engine. It offers significant performance improvements (5x faster P99 TTFB, 5.3x faster P90) and cost reductions compared to the previous Chromium-based Serverless Function approach. Key features include ease of use (no headless browser), affordability, speed, lightweight design, support for basic CSS, framework-agnostic usage, font/emoji subsetting, Tailwind CSS support via the `tw` prop, and automatic edge caching headers. The system was successfully used to generate dynamic ticket images for Next.js Conf.

WebAssembly at the Edge

8/26/2022

This post introduces support for WebAssembly in Vercel Edge Functions, enabling the execution of code compiled from languages like Rust, Go, and C. It highlights performance benefits for computationally heavy workloads and provides an example of a maze-solving application demonstrating WebAssembly's speed advantage over JavaScript.