惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
博客园 - 【当耐特】
M
MIT News - Artificial intelligence
月光博客
月光博客
博客园_首页
博客园 - 叶小钗
T
Tailwind CSS Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
InfoQ
量子位
小众软件
小众软件
爱范儿
爱范儿
The GitHub Blog
The GitHub Blog
IT之家
IT之家
Jina AI
Jina AI
阮一峰的网络日志
阮一峰的网络日志
G
Google Developers Blog
WordPress大学
WordPress大学
人人都是产品经理
人人都是产品经理
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
J
Java Code Geeks
云风的 BLOG
云风的 BLOG
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

Vercel News

Vercel Open Source Program: Winter 2026 cohort How Notion Workers run untrusted code at scale with Vercel Sandbox How we run Vercel's CDN in front of Discourse From idea to secure checkout in minutes with Stripe Building Slack agents can be easy Scaling redirects to infinity on Vercel Advancing Python typing Gamma builds design-first agents with Vercel How Avalara turns pipe dreams into patent-pending with v0 Keeping community human while scaling with agents How OpenEvidence built a healthcare AI that physicians actually trust Security boundaries in agentic architectures Skills Night: 69,000+ ways agents are getting smarter Video Generation with AI Gateway We Ralph Wiggumed WebStreams to make them 10x faster How Stably ships AI testing agents in hours, not weeks How we built AEO tracking for coding agents Anyone can build agents, but it takes a platform to run them Introducing Geist Pixel The Vercel AI Accelerator is back with $6m in credits Making agent-friendly pages with content negotiation The Vercel OSS Bug Bounty program is now available Introducing the new v0 Run untrusted code with Vercel Sandbox, now generally available How Stripe built a game-changing app in a single flight with v0 How Sensay went from zero to product in six weeks AGENTS.md outperforms skills in our agent evals Agent skills explained: An FAQ Testing if "bash is all you need" AWS databases are now live on the Vercel Marketplace and v0
Bun runtime on Vercel Functions
Authors · 2025-10-28 · via Vercel News

We now support Bun as a runtime option for Vercel Functions, available in Public Beta. You can choose between Node.js and Bun for your project, configuring runtime behavior based on workload. We're working closely with the Bun team to bring this capability to production.

This flexibility allows you to choose what works best for your use case. Use Node.js for maximum compatibility or switch to Bun for compute-intensive applications that benefit from faster execution.

Through internal testing, we've found that Bun reduced average latency by 28% in CPU-bound Next.js rendering workloads compared to Node.js.

These gains come from Bun's runtime architecture, built in Zig with optimized I/O and scheduling that reduce overhead in JavaScript execution and data handling.

Link to headingHow to use the Bun runtime

The Bun runtime is currently supported for Next.js, Express, Hono, and Nitro, with support for additional frameworks coming soon.

To enable Bun for your entire project, add the bunVersion setting to your vercel.json file:

Enable Bun runtime support in your app by adding bunVersion to vercel.json

This configuration applies Bun across your entire deployment and integrates with Vercel's observability, logging, and monitoring infrastructure automatically.

Bun supports TypeScript with zero configuration. Here's an example of creating a simple API with Hono:

import { Hono } from 'hono';

const app = new Hono();

app.get('/', (c) => {

return c.text(`Hello from Hono on Bun ${process.versions.bun}!`);

});

export default app;

Hello World endpoint in Hono with the Bun runtime on Vercel

You can also get started by using one of our starter templates:

The Bun runtime runs on Fluid compute, which handles multiple concurrent requests on the same instance. Active CPU pricing means you pay for time spent executing code, not wall-clock time waiting on responses. If your function is waiting for a database query or an API call, you're not being charged for that wait time.

Link to headingWhy runtime choice matters

Applications handle different kinds of workloads. Some perform heavy computation, others handle high request volume or stream large responses. Choosing the right runtime for your application lets you optimize for what matters most.

Bun delivers low-latency performance, efficient streaming, and robust built-in APIs through a safety-focused systems language, while Node.js offers unparalleled ecosystem maturity and broad compatibility for every use case. The choice depends on your application's priorities.

Because Vercel runs native Node.js and Bun runtimes, code runs exactly as it does locally. No emulation or compatibility layers, just full access to each runtime's native capabilities. Switching between them is a configuration change in vercel.json.

Link to headingBenchmark results

Recently, independent developer Theo Browne published comprehensive benchmarks testing CPU performance across server-side rendering (Next.js, React, SvelteKit) and computational workloads, comparing Cloudflare Workers and Vercel Functions. We analyzed the results in our previous post.

We want to thank Theo for this work. Efforts like these surface valuable insights into runtime performance, and healthy competition helps push the entire ecosystem forward, benefiting everybody.

Following the initial benchmarks, improvements were made across the ecosystem. Cloudflare optimized their scheduling algorithm and V8 garbage collection tuning, and proposed a PR to Node.js enabling a V8 flag that improves math operations. Work on OpenNext improved Next.js performance across alternative hosting environments. We profiled our infrastructure and identified bottlenecks in Node.js web streams implementation.

Link to headingWhat we measured when profiling

The original benchmarks measured time-to-first-byte (TTFB), which captures when the server begins sending a response but not the full cost of generating and transmitting it. The benchmarks were updated to measure total request duration (time-to-last-byte). For server rendering workloads, this more accurately represents what users experience, as it includes the complete work of rendering and streaming the response.

We deployed to Vercel with 1 vCPU/2GB in iad1 (us-east-1) and ran the benchmark client from a VM in the same AWS region to minimize network variability.

The benchmarks focused on server-side rendering, the process of generating HTML from React components on the server before sending it to the browser. This differs from client-side rendering, where the browser receives JavaScript and builds the page itself.

Platform overhead is the time spent in infrastructure code before reaching your application. In these tests, platform overhead accounted for only a small fraction of total request time. Nearly all execution occurred inside the application runtime.

Profiling showed that the main bottleneck in Node.js came from its Web Streams implementation and transform operations, where buffer scanning and data conversions added measurable CPU cost. Garbage collection also consumed a significant share of total processing time under heavy load.

Benchmark results measuring full TTLB with 1 vCPU/2GB

For Next.js workloads, Bun cut latency by 28% compared to Node.js. Performance was similar across platforms for React SSR, SvelteKit, and vanilla JavaScript benchmarks. The Next.js performance gains come from Bun's optimized handling of web streams and reduced garbage collection overhead. We expect the numbers for React SSR will improve further once we integrate Bun's optimized react-dom/server implementation.

The complete benchmark implementation is available on GitHub.

Link to headingPerformance characteristics and tradeoffs

Each runtime has distinct strengths. Bun delivers clear speed improvements for server rendering workloads, while Node.js remains the most compatible and battle-tested environment.

The table below summarizes their key differences:

Category

Bun

Node.js

Performance

Faster for CPU-intensive and streaming workloads

Reliable and consistent across workload types

Cold starts

Slower than Node.js due to runtime initialization overhead

Mature and well-optimized

Compatibility

Implements Node.js APIs with growing coverage; edge-case differences may exist

Full ecosystem compatibility

Ecosystem maturity

Rapidly evolving; smaller community

Stable and widely supported across frameworks and libraries

Best use

Performance-critical applications

Default for broad compatibility and production stability

Test your dependencies under Bun before migrating production traffic to confirm expected behavior. While Bun implements Node.js APIs, some edge cases may behave differently.

Link to headingDeploy Bun on Vercel

The Bun runtime is now available in Public Beta.

We're continuing to expand framework support and optimize performance across both Node.js and Bun. If you hit performance issues or have benchmarks to share, we want to see them.

Try the Bun runtime on Vercel Functions

Switch between Node.js and Bun with a single configuration change. Available in Public Beta.

Deploy with Bun