Bhavana's Week 04: One Right Page Thirty Times

Bhavana Bhariday explains how she scaled a single working page into thirty city pages with Next.js ISR, and why she chose a one-hour revalidation cadence.

2:48 video3 min readWatch on YouTube

Getting one page right is the easy part. The harder problem shows up once that page needs to become thirty, or three hundred, and every one of them still needs to be fast, accurate, and cheap to serve. That's the problem Bhavana Bhariday tackled in week four of building a job search app's SEO system: turning one correct page into a growth engine without letting the database bill grow along with it.

Turning a template into a machine

The previous week had produced a single correct page. This week's job was multiplying it. Thirty city pages needed to exist, built from the same underlying template, along with role types layered on top. The first move was deliberately boring: pulling thirty city names, and later fifteen role types, into one central file instead of retyping or subtly mistyping them across thirty separate pages. That single decision is the difference between fixing a wrong city name once and hunting it down thirty times later.

The cost of being right on demand

Here's the part that isn't boring. Thirty pages, each backed by a live database query, is nothing at ten visitors a day. At real traffic, where every single visit triggers a fresh database read, that becomes a real cost. A page that's cheap to be right once becomes expensive to be right on demand every single time a visitor loads it.

Choosing an ISR cadence: the one-hour rule

The fix is Incremental Static Regeneration, or ISR: build the page once, hand every visitor the cached copy instantly, and only occasionally check in the background whether the underlying data has changed and needs a rebuild. Every visitor gets a fast page, and the database gets a break. But "occasionally" is a number that has to be chosen, and that choice was the real decision of the week. A 60-second cadence keeps listings nearly live but rebuilds constantly under any real traffic. A full-day cadence is cheap but lets job counts sit stale for hours. An hour splits the difference: fresh enough for listings that shift through the day, loose enough not to hammer the database on every load. The number that came out of that reasoning was 3,600 seconds, one hour.

An honest thread left dangling

Worth noting directly: choosing this cadence and the cadence actually being honored turned out to be two different things. That gap didn't surface until later, and the story picks it back up when it matters. It's a useful reminder that setting a configuration value and verifying it's actually working as intended are separate steps, not the same step.

Key takeaways

  • Centralizing repeated data, like city names and role types, in one file prevents errors from multiplying across every generated page.
  • A page backed by a live database query is cheap at low traffic but expensive at scale if every visit triggers a fresh read.
  • Incremental Static Regeneration serves cached pages instantly and rebuilds them in the background on a schedule, protecting the database from load.
  • The revalidation cadence is a real trade-off: too short rebuilds constantly, too long lets data go stale.
  • A one-hour cadence (3,600 seconds) balanced freshness against database load for listings that shift throughout the day.
  • Setting a cadence and confirming it's actually being honored in production are two separate things to verify.

Try it yourself

Take a page in your own app that reads from a database on every request and ask whether it could be cached and rebuilt on a schedule instead. Then argue the cadence out loud: how stale is too stale, and how often is too often, before you settle on a number. This walkthrough comes from the Humanitarians AI Fellows program, where Fellows document real engineering decisions like this one as they build.

Chapters

  1. 0:00Turning a Site into a Machine
  2. 0:20Scaling with City Names and Role Types
  3. 0:40The Cost of Being Right on Demand
  4. 1:05Choosing an ISR Cadence: The 1-Hour Rule
  5. 1:35Recap: One Right Page 30 Times
Full transcript(auto-generated, with timestamps)

Turning a Site into a Machine

[0:00]Hi, I'm Bhavana, a Humanitarian's AI fellow, week four of my Job Seeker report, the job search app where I handle SEO, making Google find and rank our listings. Last week, one correct page. This week, 30 city pages and one real judgment call about how fresh fresh enough should be. Executive summary first. One good page

Scaling with City Names and Role Types

[0:22]Is nice, 30 are a growth engine, but only if they're cheap to run. This week turns the single template into 30 city pages and picks how often to rebuild each cached one. The first move was boring on purpose. 30 city names, later 15 roles, pulled into one file instead of being retyped or subtly mistyped

The Cost of Being Right on Demand

[0:41]Across 30 separate pages. It's the difference between fixing a wrong city name once and hunting it down 30 times later. Here's the part that isn't boring. 30 pages, each backed by a live database query. At 10 visitors a day, that's nothing, but if every single visit triggers a fresh read at real traffic, that's a real cost. The page is cheap to be right once. It's expensive

Choosing an ISR Cadence: The 1-Hour Rule

[1:05]To be right on demand every time. The fix next, JS offers is ISR. Build the page once, then hand everyone the cached copy instantly, and only occasionally in the background check whether the data underneath has moved on and rebuild. Every visitor gets a fast page. The database gets a break, but occasionally is a number you have to choose, and that's the real decision of the week. 60 seconds keeps it nearly live, but rebuilds constantly under any real

Recap: One Right Page 30 Times

[1:35]Traffic. A full day is cheap, but let's job count sit stale for hours. An hour split the difference. Fresh enough for listings that shift through the day, loose enough not to hammer the database on every load. So, the number became 3,600, 1 hour. But, here's an honest thread to leave dangling because accuracy is the whole point. Choosing this cadence and the cadence actually being honored turned out to be two different things. That gap didn't surface until much later. This story picks it back up when it matters. The recap. The site became a machine. One constant file, 30 cities and 15 roles, one template. Each page served from cash instantly and rebuilt in the background. And the judgment, revalidate every hour, fresh enough without hammering the database. The rule this week, one right page 30 times. Your turn. Take a page in your app that reads from a database on every request and ask Claude. Could this be cached and rebuilt on a schedule instead? Then argue the cadence out loud. How stale is too stale? How often is too often before you pick the number? Run this and make yourself justify it. One right page 30 times.

More from Humanitarians AI Fellows

Humanitarians AI Lyrical Literacy Project