Skew Protection

Version skew protection for Next.js and any framework

Skew protection pins each client to the deployment that served its page, so a release mid-session never breaks a loaded app with a ChunkLoadError. It is on by default, automatic for Next.js, and works with any framework through the x-deployment-id header or the ?dpl= query parameter, on Ploy Cloud or self-hosted on your own servers.

Requests After a New Deploy

The Timeline

A user loads the page, then a new deployment goes live

Page served

Browser runs the bundle from dpl_a1

New deploy

dpl_b2 goes live with new chunk hashes

Pinned requests

Follow-up requests carry x-deployment-id: dpl_a1

Requests From the Open Tab

Pinned requests resolve to the deployment that served the page

RequestServed byResult
/_next/static/chunks/app/page-8c1f.jsdpl_a1
200
/dashboard?_rsc=1x9kdpl_a1
200
/api/profiledpl_a1
200
/ (full reload)dpl_b2
200

Key Features

On by Default

Every project is protected without setup. Opt out with skew_protection: false in ploy.yaml.

Zero-Config Next.js

Ploy sets NEXT_DEPLOYMENT_ID at build time, so chunks, client navigations and prefetches stay on the deployment that served the page.

x-deployment-id Header

Any framework or worker can pin a request by sending PLOY_DEPLOYMENT_ID as the x-deployment-id header or the ?dpl= query parameter.

Your Own Fetches

ployFetch from @meetploy/nextjs pins the client fetch calls you write, not just the ones Next.js makes for you.

Safe Fallback

Pins resolve to successful deployments on the same project and branch for 24 hours. Anything else returns 404, so the app reloads to the latest version.

Self-Hosted Too

Skew protection is part of the open-source platform, so on-premise installs get it without a separate service.

Pin Your Own Requests

Next.js needs nothing. For custom client fetches and other frameworks, attach the deployment id.

client.ts
// Next.js: pin a custom client fetch
import { ployFetch } from "@meetploy/nextjs/config";

const profile = await ployFetch("/api/profile");

// Any framework: send the deployment id yourself
const data = await fetch("/api/data", {
  headers: { "x-deployment-id": process.env.PLOY_DEPLOYMENT_ID },
});

Ready to get started?

Deploy your first project in minutes with Ploy.