Skip to content

docs: clarify instance-local revalidation behavior in multi-instance …#92403

Closed
Akash504-ai wants to merge 2 commits intovercel:canaryfrom
Akash504-ai:docs/revalidation-instance-warning
Closed

docs: clarify instance-local revalidation behavior in multi-instance …#92403
Akash504-ai wants to merge 2 commits intovercel:canaryfrom
Akash504-ai:docs/revalidation-instance-warning

Conversation

@Akash504-ai
Copy link
Copy Markdown

What?

Adds a clear warning in the "Multi-Instance Considerations" section to highlight that revalidation is instance-local by default in multi-instance or serverless environments.

Why?

While the behavior is already explained later in the section, it is not immediately obvious to most users—especially those deploying on serverless platforms like Vercel.

This can lead to confusion, as developers may assume that revalidateTag() or revalidatePath() invalidates cache globally across all instances, when in reality it only affects the instance handling the request.

How?

  • Added a short ⚠️ Important note at the beginning of the section
  • Did not modify existing content or behavior explanations
  • Improves visibility of a critical limitation without changing meaning

Fixes #92402

@nextjs-bot nextjs-bot added the Documentation Related to Next.js' official documentation. label Apr 6, 2026
@nextjs-bot
Copy link
Copy Markdown
Collaborator

nextjs-bot commented Apr 6, 2026

Allow CI Workflow Run

  • approve CI run for commit: 952eab8

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer


## Multi-Instance Considerations

> ⚠️ **Important:** In multi-instance or serverless environments (such as deployments on Vercel), revalidation is instance-local by default.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is repeating the first sentence on 63 no? and the platform mentioned here, does handle this already.


> ⚠️ **Important:** In multi-instance or serverless environments (such as deployments on Vercel), revalidation is instance-local by default.
>
> Calling `revalidateTag()` or `revalidatePath()` only invalidates the cache on the instance handling the request. Other instances may continue serving stale content until they receive the invalidation event through a shared cache or coordination mechanism.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repeats the second sentence on 63, only adding revalidatePath

>
> Calling `revalidateTag()` or `revalidatePath()` only invalidates the cache on the instance handling the request. Other instances may continue serving stale content until they receive the invalidation event through a shared cache or coordination mechanism.
>
> To ensure consistent revalidation across instances, you should configure a shared cache handler (for example, using Redis or another external store).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ### Multi-instance with shared cache section mentions this though - and the Redix example is actually linked further down

@Akash504-ai
Copy link
Copy Markdown
Author

Thanks for the feedback @icyJoseph, I have simplified the note to avoid duplication and removed the extra details. Let me know if this looks good


## Multi-Instance Considerations

> **Note:** Revalidation is instance-local by default.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And once again, is this not the very same thing said in line 59? What is the problem you are trying to solve here.

@Akash504-ai
Copy link
Copy Markdown
Author

Closing this as not relevant, thanks for the clarification.

@Akash504-ai Akash504-ai closed this Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Related to Next.js' official documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: Revalidation behavior is instance-local by default, not clearly highlighted for multi-instance/serverless environments

3 participants