04 / 20

What is are different revalidation strategies in Incremental Static Regeneration (ISR)?

Difficulty: 6/10
time-based revalidation, on-demand revalidation, fallback strategies
There are three ways to revalidate content:
  1. 1

    Time-based revalidation

  2. 2

    On-demand revalidation with revalidatePath

  3. 3

    On-demand revalidation with revalidateTag

Time-based Revalidation Example
revalidatePath Examples
revalidateTag Examples

Scenario Questions

0-2 years experience

  1. 1If you set `revalidate: 60` on a page using `getStaticProps`, what will happen when a user visits that page after two minutes of inactivity?
  2. 2How would you configure a page so that it revalidates on every request without rebuilding the whole site?
  3. 3What does the `fallback: 'blocking'` option do in relation to ISR revalidation?

2-5 years experience

  1. 1You notice that a product page is serving stale data even though you set `revalidate: 30`. Walk me through how you'd debug the issue.
  2. 2Explain the trade‑offs between using a fixed `revalidate` interval and using on‑demand revalidation via the API.
  3. 3A feature flag toggles a new API endpoint, but the ISR page still shows the old data after the flag is turned on. How would you adjust the revalidation strategy to handle this?

5-8 years experience

  1. 1Design a strategy for a high‑traffic news site that needs per‑article ISR with different freshness requirements (e.g., breaking news vs evergreen). What revalidation mechanisms would you combine and why?
  2. 2Discuss how you would prevent a thundering herd problem when many users request a page right after its revalidation window expires.
  3. 3How would you integrate on‑demand revalidation with a CI/CD pipeline to ensure content updates are instantly reflected after a deployment?

8+ years experience

  1. 1At a large e‑commerce platform, you need to migrate legacy server‑side rendering pages to ISR while maintaining SEO and zero downtime. Outline the architectural plan, including revalidation strategy choices.
  2. 2Consider cross‑team ownership of a shared component library that uses ISR. How would you establish guidelines for when to use time‑based revalidation versus webhook‑driven on‑demand revalidation to balance performance and data consistency?
  3. 3What long‑term monitoring and alerting would you put in place to detect when ISR revalidation is failing across many pages?

Follow-up Questions

  • What impact does a short revalidation interval have on your CDN cache?
  • How would you handle a situation where the on-demand revalidation endpoint fails?
  • Can you describe a scenario where you’d prefer `fallback: true` over `fallback: 'blocking'` with ISR?
Share

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.