Cloud//Vercel//Vercel Functions
Serverless functions on Vercel. In a Next.js project, these are the API Routes — backend code that lives in the same repo as the frontend.
Serverless functions on Vercel. In a Next.js project, these are the API Routes — backend code that lives in the same repo as the frontend.
API Routes in Next.js (app/api/*/route.ts) deploy as Vercel Functions automatically
Run on AWS Lambda under the hood — same execution model (container spin-up, cold starts, per-invocation billing)
Timeout: 10s (Hobby), 60s (Pro), 300s (Enterprise). If a function takes longer, it dies. For heavy batch work (e.g. processing thousands of Gmail messages), a single function will timeout — you need a job queue like Inngest or Trigger.dev that breaks the work into chunks and processes them sequentially.
The "backend that lives inside your frontend project" — you define routes in Next.js, Vercel deploys them as serverless functions
Vercel also offers Cron Jobs — scheduled functions that run at fixed intervals (hourly, daily, etc.). Better for recurring batch work than trying to cram everything into one function call.
Contrast with Workers: Vercel Functions are heavier (Lambda containers), slower to start (cold starts), but can run longer and have full Node.js access