Skip to content
Tutorials Center
My learning

Topics

Lesson 33 of 37 ยท Performance and Limits

Limits, Quotas and Costs

Understand the limits that matter on Vercel and Netlify: bandwidth, build minutes, function duration and memory, request sizes, and how to estimate and control your bill with spend limits.

Free tiers are generous, but every platform has limits, and surprise bills almost always come from not knowing which numbers are metered. This lesson teaches what is limited and how to reason about it. It deliberately avoids quoting current prices: plans, quotas and rates change often, so always read the current pricing page before you decide.

The platforms cannot run here. No figure below is an official quota unless stated as a general category; all numbers in code are invented for practice. The runnable stand-ins are JavaScript cost and limit models.

The categories of limits

Category What it counts Typical consequence of exceeding
Bandwidth (data transfer) bytes sent from the CDN to visitors overage charges or throttling on free plans
Build minutes time your builds take builds queue or are blocked until the next cycle
Concurrent builds how many builds run at once builds wait in a queue
Function invocations number of function calls overage or pause
Function duration compute time per call, often billed as GB-hours overage; a timeout ends a call early
Function memory and size RAM and bundle size per function a failed deploy or out-of-memory crash
Request/response size payload bytes per call HTTP 413 or 502 errors
Edge requests / middleware requests handled at the edge overage
Storage blobs, KV and database size overage or write failures
Team seats paid members per-seat fees

Function limits are the ones that shape code. A serverless function typically has a maximum duration (seconds to minutes, depending on plan and configuration), limited memory, a cap on the request and response body (a few megabytes on many setups), and a maximum bundle size. Streaming responses, background functions (Netlify) and long-running options like Vercel's configurable maxDuration extend some limits. Check the current docs for your plan.

Designing around limits

  • Long work (video processing, big reports): do not do it in one request. Start it, store a job record, process with a queue or a background function, and let the client poll or receive a webhook.
  • Big uploads: send them straight to object storage (Object Storage and Blobs), not through a function.
  • Large responses: paginate, compress, or stream.
  • Slow third-party APIs: set timeouts that are shorter than your function's, and return a friendly error.
  • Cold starts: a function that has not run recently starts slowly the first time. Keep bundles small and avoid heavy initialization at import time.

What is metered

Bandwidth Bytes served to visitors.
Builds Minutes and concurrency.
Functions Calls, duration, memory.
Storage Blobs, KV and databases.

Read the live pricing page, not old blog posts.

1 / 2

Estimating a month

A quick estimate turns traffic into the numbers platforms meter. The stand-in uses invented allowances and prices, so substitute the real ones from the pricing page you are using.

JS Usage estimator stand-in

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The last line shows the most effective cost lever: shrinking page weight (see Images and Web Vitals) lowers bandwidth and makes the site faster. Caching (Caching and the CDN) similarly cuts function invocations.

Timeouts and size checks

A function that takes too long is cut off, and the visitor sees an error. This stand-in wraps work in a timeout and rejects oversized bodies, the defensive habits to bring to production code.

JS Timeout and size guard stand-in

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Keeping control of the bill

  1. Spend management: on paid plans set a spend limit or budget alert so a traffic spike or a bug cannot run up an unbounded bill. Some plans pause projects instead of charging overage; know which behavior you have.
  2. Alerts: enable usage notifications before you reach 80 percent of a quota.
  3. Watch the usual suspects: an image route used by crawlers, an uncached API endpoint, an infinite redirect or retry loop, and a build triggered on every commit to every bot branch.
  4. Reduce builds: use the "ignored build step" (Vercel) or a build ignore command (Netlify) to skip builds when nothing relevant changed, which also helps monorepos (Monorepo Deploy Project).
  5. Block abuse: use the platform firewall, bot protection, or rate limiting for scraping and DDoS traffic.
  6. Know your commercial terms: free and hobby plans often forbid commercial use or high-traffic use.

Is a platform always the right choice?

Platforms charge for convenience. A site with huge static traffic can be much cheaper on object storage plus a CDN; a heavy, always-on backend may be cheaper on a container host. That is a business decision, not a flaw, and the code you write for either platform remains largely portable if you stick to standard web APIs.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which change is likely to reduce both bandwidth cost and page load time?

    Fewer bytes served means lower transfer and faster pages.
  2. 2. A report takes five minutes to generate but the function limit is shorter. What is the right design?

    Long work should be decoupled from a single request and returned later.
  3. 3. Why is a spend limit useful?

    A cap or alert turns a surprise into a notification.
  4. 4. Why should you check current pricing pages instead of old articles?

    Plans, included allowances and rates are updated regularly.

Summary

  • Limits fall into bandwidth, builds, functions, storage and seats.
  • Function duration, memory and body size shape how you structure code.
  • Estimate usage from traffic and tune the biggest lever, often page weight and caching.
  • Add timeouts, size checks and background jobs for heavy work.
  • Set spend limits and alerts, and read current pricing before committing.

Next: Project: A Portfolio Site