<Muhammad Huzaifa />
Home/Blog/How I Reduced Next.js ISR Writes from 6,000 to 200 Per Day With One Simple Code Change
March 29, 2026

How I Reduced Next.js ISR Writes from 6,000 to 200 Per Day With One Simple Code Change

Reduce Next.js ISR writes on Vercel by choosing smarter revalidation strategies. Use daily caching or on-demand updates to save API calls and optimize usage.

How I Reduced Next.js ISR Writes from 6,000 to 200 Per Day With One Simple Code Change
Next.js · Performance
How I Reduced Next.js ISR Writes from 6,000 to 200 Per Day With One Simple Code Change
Most developers blindly set revalidate: 3600 in Next.js ISR — burning through Vercel's limits every month without realizing it. Here's the smarter caching strategy that cut my ISR writes by 97%.
6,000
ISR writes/day before
200
ISR writes/day after
97%
reduction achieved
The Problem With revalidate: 3600

When you use Incremental Static Regeneration (ISR) in Next.js, the revalidate value tells Next.js how often to regenerate a page in the background. Setting revalidate: 3600 means every page will attempt a rebuild every hour — regardless of whether your data actually changed.

With 100 pages and normal traffic, that's 100 rebuilds × 24 hours = 2,400+ ISR writes per day minimum. Vercel's free and pro plans have limits, and this eats through them silently.

⚠ Don't do this Setting revalidate: 3600 on every page triggers automatic background rebuilds every hour — even when nothing has changed. This is the #1 cause of unexpected Vercel ISR overages.
Fix 1 — Use revalidate: 86400 (Daily Cache)

If your content doesn't change multiple times a day, switch to a 24-hour cache. This alone cuts your ISR writes by 24×.

❌ Before
revalidate: 3600
Rebuilds every hour
~24× more writes/day
✅ Better
revalidate: 86400
Rebuilds once per day
Massive reduction in writes
export async function getStaticProps() {
  const data = await fetchData();
  return {
    props: { data },
    revalidate: 86400, // ✅ 24 hours — not 3600
  };
}
Fix 2 — The Best Approach: revalidate: false + On-Demand Revalidation

This is the real power move. Set revalidate: false so the page is never automatically rebuilt. Then call the revalidation API only when something actually changes — on add, update, or delete.

✅ Best practice Cache the page indefinitely with revalidate: false. Trigger a rebuild only when data actually changes. Zero wasted ISR writes.
Step 1 — Disable automatic revalidation
export async function getStaticProps() {
  const data = await fetchData();
  return {
    props: { data },
    revalidate: false, // ✅ Never auto-rebuild
  };
}
Step 2 — Create an on-demand revalidation API route
// pages/api/revalidate.js
export default async function handler(req, res) {
  if (req.query.secret !== process.env.REVALIDATE_SECRET) {
    return res.status(401).json({ message: 'Invalid token' });
  }
  try {
    await res.revalidate(req.query.path); // e.g. '/blog/my-post'
    return res.json({ revalidated: true });
  } catch (err) {
    return res.status(500).send('Error revalidating');
  }
}
Step 3 — Call it whenever data changes
// In your CMS webhook, admin action, or API mutation
await fetch(`/api/revalidate?secret=${SECRET}&path=/blog/${slug}`);
// That's it. One ISR write. Only when needed.
The Result

Before: pages rebuilding every hour all day and night, burning through Vercel limits silently. After: pages cached until you explicitly tell Next.js to rebuild them — a write only happens on actual content changes.

📊 Real numbers from my app 6,000 ISR writes/day → 200 ISR writes/day. Same content freshness, 97% fewer writes, zero surprise Vercel bills.
Summary

Don't use revalidate: 3600 — it rebuilds every page every hour with no regard for whether data changed.

Use revalidate: 86400 if your content changes at most once a day — simple drop-in improvement.

Best: Use revalidate: false + on-demand revalidation via API. Cache forever, rebuild only on actual updates. This is the right way to use ISR at scale.

Next.js ISR
ISR revalidation
Vercel ISR writes
Next.js performance optimization
reduce ISR writes
revalidate 3600 issue
revalidate 86400
on-demand revalidation
Next.js caching strategy
Vercel usage optimization
Next.js getStaticProps
ISR best practices
Share: