Serverless

Serverless is a cloud computing model where you write functions and the cloud provider handles all server management — scaling, infrastructure, and availability. You don't manage servers; you deploy code, and it runs on demand. For vibe coders, serverless is how most modern apps deploy — platforms like Vercel and Netlify are serverless under the hood.

Example

Your API route on Vercel is serverless. When a user hits /api/generate, Vercel spins up a function to handle the request, runs your code, returns the response, and shuts down. You pay only for the time your code actually runs.

Serverless doesn't mean "no servers" — it means you don't think about them. Someone else manages the infrastructure while you focus on code.

Serverless vs Traditional Hosting

Traditional ServerServerless
Always runningRuns on demand
You manage infrastructureProvider manages everything
Fixed monthly costPay per execution
You handle scalingAuto-scales automatically
Full controlLimited control

How Serverless Works

  1. You deploy a function — A piece of code that handles a request
  2. A request arrives — User hits your endpoint
  3. Cloud spins up your function — Milliseconds to start
  4. Function runs and responds — Processes the request
  5. Function shuts down — No idle resources

Serverless Platforms for Vibe Coders

PlatformBest For
VercelNext.js apps, API routes
NetlifyStatic sites, edge functions
AWS LambdaCustom serverless functions
Cloudflare WorkersEdge computing, fast globally

Serverless Limitations

  • Cold starts — First request after idle is slower
  • Execution time limits — Functions can't run forever (usually 10-60 seconds)
  • No persistent state — Functions don't remember between calls
  • Vendor lock-in — Moving between providers takes work

When to Use Serverless

Good fit: API routes, webhooks, scheduled tasks, form handling Bad fit: Long-running processes, WebSocket connections, AI agents that need persistence

Most vibe coders start serverless (Vercel) and add a VPS only when they need always-on services.