Skip to content
Dashboard

Evolving Vercel Functions

VP of Developer Experience

Faster, modern, and more scalable

Link to headingIncreased Concurrency

Vercel's infrastructure scales automatically based on demand.

Link to headingWeb Standard API Signature

api/hello.js
export default function handler(request, response) {
res.status(200).json({ message: 'Hello Vercel!' });
}

The Node.js inspired signature for Vercel Functions

api/hello.ts
export async function GET(request: Request) {
const res = await fetch('https://api.vercel.app/blog', { ... } )
const data = await res.json()
return Response.json({ data })
}
export async function POST(request: Request) {
// Can also define other HTTP methods like PUT, PATCH, DELETE, HEAD, and OPTIONS
}

Vercel Functions now support a unified, isomorphic signature

api/hello.ts
export async function GET(request: Request) {
// Read headers
const token = await getToken(request.headers);
// Set cookies
return new Response('Hello Vercel!', {
status: 200,
headers: { 'Set-Cookie': `token=${token.value}` },
});
}

Learn the Web standard APIs and reuse your knowledge across frameworks

Link to headingZero-Config Function Streaming

Comparison between a non-streaming and streaming HTTP response Comparison between a non-streaming and streaming HTTP response
Comparison between a non-streaming and streaming HTTP response

Link to headingLong Running Functions

api/hello.ts
export const maxDuration = 300; // 5 minutes
export async function GET(request: Request) {
// ...
}

You can run functions for up to five minutes on Pro

Link to headingFaster Cold Starts

Link to headingAutomatic Regional Failover

Link to headingIncreased Logging Limits

Quickly identify the root cause of persistent errors and customer issues with Logs.Quickly identify the root cause of persistent errors and customer issues with Logs.
Quickly identify the root cause of persistent errors and customer issues with Logs.

Link to headingConclusion