Skip to content
commitius

What are ISR Writes, Build CPU and Fast Origin Transfer on a Vercel bill, and how do you bring them down?

What the three fastest-growing lines on a Vercel bill measure, why they grow and which settings lower them. A short guide based on Vercel's own documentation.

Can DemirFounder & author · 5 min read
The Vercel logo on the screen of a phone held up against blurred blue lights

All three depend less on how many people visit than on how the site itself works. ISR Writes is your pages being regenerated and written to Vercel's durable cache. Build CPU is the time the machine that builds your site runs on every deployment. Fast Origin Transfer is the data moving between the function that renders a page and Vercel's network. All three drop noticeably with the right settings, and a few small changes in the code are often enough.

ISR WritesA regenerated page written to the durablecache, in 8 KB unitsBuild CPUBuild time multiplied by the number of cores onthe machineFast Origin TransferData moving between the function that renders apage and Vercel's network

What does ISR Writes count?

When you give a Next.js page a revalidation time, Vercel regenerates it at intervals or when you ask it to. The new page is written to two places. The short-lived cache in the region nearest the visitor is free. The durable cache in the region where your function runs is billed, and Vercel counts what is written there in 8 KB units. An 80 KB page uses ten write units every time it is regenerated. In the Frankfurt region one million write units cost $5.20 and one million read units cost $0.52.

There is a detail in Vercel's documentation that is easy to miss. When revalidation runs and the page has not changed since the last version, no write is billed. So it is not the regeneration that inflates the bill but a page that comes out different every time. The current time printed on the page, a randomly picked suggestion or an ID generated on every render makes the page different even when the content is the same, and turns every regeneration into a billed write.

How do you bring ISR Writes down?

  • Take changing values out of the page. Dates, random numbers and IDs generated on every render should not be written into it.
  • Give content that rarely changes a long revalidation time. When a price or stock level changes, refresh the page at that moment instead of on a timer. Next.js calls this on-demand revalidation.
  • Make the page smaller. Pass Client Components only the fields they use, not the whole record, split long lists into pages, and serve large repeated SVGs as separate files. Vercel's guide on this also shows how to find which addresses write the most.
  • Check whether one piece of data makes many pages stale at once. A list shown on every product page rewrites thousands of pages the day it changes.

How is Build CPU calculated?

On every deployment Vercel installs and builds your project on a build machine. On paid plans that time is billed in CPU minutes. By Vercel's definition a CPU minute is one minute of build time multiplied by the number of cores on the machine. A three-minute build on a 4-core machine is 12 CPU minutes. On the smallest machine a CPU minute costs $0.0035. The elastic machines Vercel turns on by default for new teams can grow from 4 to 30 cores depending on the project, so a faster build can also be a bigger bill.

What grows this line is usually not the length of one build but the number of builds. Every small commit starts a new build, and preview branches are built separately too. Rendering thousands of pages ahead of time during the build also makes it longer.

How do you bring Build CPU down?

  • Skip builds you do not need. With Vercel's Ignored Build Step setting a build does not start at all when, for example, only the docs changed.
  • Collect small fixes into one deployment.
  • Render your most visited pages at build time and leave the rest to be rendered on their first visit.
  • Make sure the build cache works and your Node.js version is current.
  • If your project does not need a big machine, pin the machine type to a small one.

Why does Fast Origin Transfer grow?

Vercel measures data on two separate paths. Fast Data Transfer is the data between Vercel's network and the visitor's device. Fast Origin Transfer is the data between Vercel's network and the function that renders the page or the response. When a page is served from the cache the function does not run and this line does not move. Every request that misses the cache, every ISR regeneration and every API call goes to the function, and the whole response is counted here. The first 10 GB are included on the Hobby plan, and on the Pro plan it costs $0.06 per GB in Frankfurt.

Be careful if you use middleware. According to Vercel's documentation, middleware that runs on every request can count this line twice for the same request.

How do you bring Fast Origin Transfer down?

  • Add cache headers to function responses. A response served from the cache never reaches the function.
  • Remove fields the page does not use from API responses.
  • Run middleware only on the addresses that need it. Next.js has the matcher setting for this.
  • Do not turn off ETag support. It is on by default in Next.js and stops an unchanged response from being sent again.

Where should you start?

Open the Usage page in the Vercel dashboard and split each line by project and region. Start with whichever is largest. On the sites we looked at, ISR Writes was usually first and Build CPU second, and both fell quickly after a few changes in the code. If the bill is still growing after these settings, we explained how the site would run on your own server in our note on the Vercel bill. When that time comes, we also handle moving off Vercel to your own server.

Share

Working on something similar?

Tell us in a few sentences what you want to do, and we will work out the right way together.