Skip to content
Dashboard

Evolving Vercel Functions

VP of Developer Experience

Faster, modern, and more scalable

Copy link to headingIncreased Concurrency

Vercel's infrastructure scales automatically based on demand.

Copy 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

Copy 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

Copy 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

Copy link to headingFaster Cold Starts

Copy link to headingAutomatic Regional Failover

Copy 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.

Copy link to headingConclusion

Ready to deploy?