What a Vercel Load Test Actually Measures
Most load tests of a Next.js app on Vercel measure the CDN. Read x-vercel-cache to tell cache from code, and set up the run to hit your functions.
A specific failure shows up when a team load tests a Next.js app on Vercel. The test runs, the numbers are excellent, and someone posts the flat latency line in a launch channel. Two weeks later the campaign goes live and checkout falls over at a fraction of the tested load.
Nothing was wrong with the test. It measured what it was pointed at, which was a content delivery network. This article shows how to tell the difference before you draw a conclusion, using response headers that Vercel documents, and how to set up a MaxoPerf run so that the numbers describe your code. The setup steps are in Load test an app on Vercel. If the run is being blocked before it measures anything, start with Load testing an app on Vercel without getting blocked.
Every statement about Vercel below comes from Vercel’s public documentation, read on 2026-11-21 and linked inline. The article contains no benchmark numbers for Vercel or for MaxoPerf. Numbers you collect about your own application are the ones that matter, and Vercel’s guidance asks you to coordinate before significant load.
The header that decides what your test means
Vercel sets x-vercel-cache on responses from its CDN. Vercel’s response headers page lists six values, and the cache status page defines them:
| Value | Vercel’s definition | Did your code run for this request? |
|---|---|---|
HIT | The response came from the cache | No |
PRERENDER | Served from static storage, such as a page prerendered at build time | No |
STALE | An existing response that was no longer fresh, served while Vercel refreshed it in the background | Not for this request |
MISS | Not in the cache, so generated from your function or origin | Yes |
BYPASS | Vercel skipped the cache and served fresh content from your function or origin | Yes |
REVALIDATED | The cached entry had been deleted, so Vercel regenerated the response in the foreground | Yes, and the request waited for it |
The top three rows describe infrastructure you do not own and cannot break with your own code. The bottom three describe your application.
A run whose responses were mostly HIT is a valid measurement of Vercel’s edge. It answers a question nobody asked, because the edge is not what fails during a launch.
One wrinkle changes how you read MISS. Vercel notes that for dynamic routes and for fetch requests that use its runtime cache, the header often shows MISS even when the data came from the runtime cache. The header describes response caching. Data caching is a separate layer. On Vercel’s cache status page, a miss on a dynamic route is described as expected, since dynamic routes are generated on every request. So MISS tells you the CDN did not answer. It does not tell you that every layer behind the route was cold.
Why the homepage is the wrong target
The homepage is the page most likely to be prerendered, which makes it the page least able to tell you anything. Vercel’s load-testing guide says the same thing about static assets: when you benchmark them, you mostly measure the CDN, not your code paths. It tells you to test dynamic routes, database calls and integrations.
The routes worth testing are the ones that do work per request: an API route, a personalised dashboard, a search result, a cart, a checkout. Those routes also carry most of the cost, since each one invokes a function.
Sort your routes before you test
One request per route is enough to sort them. Run it against the Staging or Preview deployment you plan to test:
curl -sI https://your-preview-url.vercel.app/api/products | grep -i x-vercelRecord x-vercel-cache and x-vercel-id for your top twenty routes. Vercel documents x-vercel-id as a list of the Vercel regions the request hit, plus the region the function ran in. The exact format is not specified, so read it as a list of region codes and do not write a parser that depends on the position of an entry.
Split the routes into two lists. The cached list is not your test. The uncached list is.
Four documented behaviours that change what a naive test measures
Each of these comes from Vercel’s cache status page, and each one shifts the meaning of a result.
Request collapsing means requests are not always function invocations. Vercel’s request collapsing page says that when several requests arrive for the same uncached path while the first invocation is still running, the CDN holds the rest and serves them the first response. The page lists ISR and Image Optimization as the supported features, so this applies to routes whose response Vercel caches, not to a plain dynamic API route that sets no cache headers. Where it applies, a thousand simultaneous requests to one cold path can cause a handful of function runs. The held requests show up as misses, so your results show a thousand responses and your logs show far fewer invocations. A test that hits one ISR URL repeatedly is the most exposed, because it creates exactly the same-path concurrency that Vercel collapses. Check which kind of route you are testing before you compare request counts with invocation counts.
Every deployment starts with a cold cache. Vercel scopes cached responses to the deployment that produced them. After a new deployment, the first requests to each path are cold misses. The traffic you send right after a release is therefore different from the steady state, and “we deployed and it got slow” is sometimes this effect and not a regression.
Foreground and background regeneration cost different amounts. A STALE response is served immediately while Vercel regenerates the entry in the background. A REVALIDATED response had no stale copy to fall back on, so the request waits for the full regeneration. If your test includes a purge or a call to revalidatePath, know which of the two you are measuring.
Failed revalidation is invisible in the response. If Vercel tries to regenerate an entry and the request fails, for example because your function errored, it keeps serving the last good response and retries later. Your test sees healthy responses while regeneration fails behind them. Check your function logs as well as your results.
The edge region is not the compute region
For a cached response, a nearby edge location answers and almost nothing travels. For an uncached response, the path is visitor, edge, function region, your data and back. Every leg adds distance.
Vercel’s Functions run in a single region by default, iad1 (Washington, D.C.), for all new projects, and its documentation advises choosing regions close to your data source, since regions far from your external services increase latency. A test that runs from one place cannot see a regional problem, because the problem is defined by the places you did not test from. Run the same scenario from at least two locations on different continents and compare latency per location.
Make the run measure your code
Four choices turn a CDN test into an application test.
Choose uncached routes. Use the list from the previous section. Keep a small share of cached routes only if production traffic includes them, and label them so they do not blend into the rest.
Assert on content. Add a check for a string that only your rendered application produces. This one line turns “an authentication page answered in 40 ms” from an excellent result into a failed test. Deployment Protection answers quickly and consistently, so a status-code check alone will pass on it.
Label every request. A single average over a mix of cached and uncached routes hides both. In Taurus, set label: on each request. In k6, pass a name tag in the request params. In JMeter, the sampler name is the label. MaxoPerf then reports one row per label.
Mind cache busting. Appending a random query string to defeat the cache measures the uncached path for every request, which is stricter than production traffic. Whether the query string is part of the cache key depends on your configuration, so check one request with curl -I before you rely on it. If you use it, say so when you report the result.
Read the results per label
After the run, open the run’s Request stats tab. It lists each label with its sample count, response times and errors, and a COMBINED row for all labels together.

The Request stats tab of a finished run: one row per label (GET products, GET categories) plus a COMBINED row, with a sample count and response times for each. This is a seeded demo run against a demo shop, not a Vercel deployment, so read the layout and not the numbers.
Judge latency per label. A COMBINED row that mixes a cached route at 20 ms with an uncached one at 400 ms describes neither. If you kept a cached label in the test, it should look like the fast row, and the uncached labels should carry the signal.
MaxoPerf does not split run results by x-vercel-cache value today. To check the distribution on a route, sample it with curl -I before and after the run, or write the header into a log line from a test script. Labels per route type give you the split in the results themselves.
A method you can repeat
- Classify routes. Use
curl -Ito sort cached from uncached. This takes minutes and removes most wasted runs. - Run a baseline first. Start at a rate you are sure is safe and keep the result. Record the deployment ID, the time, the locations and a sample of cache statuses. Every later run is a comparison against this one.
- Add content assertions before you raise the rate.
- Run from two locations and compare per-location latency.
- Separate cold from warm. Run once right after a deployment and once against a warmed deployment. Compare cold with cold and warm with warm, since averaging them destroys the information in both.
- Test what is not on Vercel. Your database under concurrency, your search index, your payment sandbox and the internal APIs your server code calls are the ceiling in many incidents. Estimate the Vercel bill from a load test covers what each run costs, which also tells you how large a run you can afford to repeat.
- Keep the scenario. A small run on every change catches more over a quarter than one large exercise a year.
What a good result looks like
A trustworthy run has labels that name the routes, content assertions that pass on every request, a recorded sample of cache statuses, results from more than one location and a baseline to compare against. A run that lacks them can still be fast. It cannot tell you whether the speed belongs to your application or to Vercel’s CDN.