Salta al contenuto principale
All notes
2025 · 11 · 6 min

Vercel cost controls: a practical playbook

Vercel is fast to ship on and fast to overspend on. Three controls catch most of the surprise: ISR with sane revalidate, image optimization budgets, and a cap on Serverless duration.

Vercel's pricing is fair on average and brutal at the tails. The sites I've seen blow up the bill all did the same three things wrong, and they're all preventable in an afternoon.

Control one: revalidate. Every fetch defaults to no caching. If you're rendering a page from a CMS, set a revalidate window that matches editorial cadence. Most teams set `revalidate: 3600` once across their templates and watch the function invocations drop 80%.

Control two: image optimization. Vercel charges per source image. If your CMS feeds 50 different image URLs into Next/Image, that's 50 originals × every variant. Add `loader` config that points at your CDN's transform layer for non-LCP images and keep Vercel's optimizer for the hero only.

Control three: Serverless duration. Set `maxDuration` to a sane number (30s, not the default 300s) on every route. A runaway function will run for 5 minutes by default, and you pay for every second. Cap it.

WRITTEN BY
Ibrahim Aly
SENIOR FS ENGINEER · BERLIN ↔ CAIRO