Vercel Functions Under Load: Cold Starts and Fluid Compute
What a load test shows about Vercel Functions: cold starts, instance reuse under Fluid compute, region distance, duration limits and database connections.
Vercel Functions run your server code, and a load test of a Next.js app on Vercel spends most of its effort there once the CDN is out of the way. This article covers what is specific to Vercel’s function runtime: Fluid compute, the way it reuses instances, what that does to cold starts, and which limits and connection settings a test exposes. It assumes the test already reaches your functions. If it does not, read What a Vercel load test actually measures and the how-to Load test an app on Vercel first.
Vercel’s documentation changes, so every statement about Vercel here links its source and was read on 2026-11-21. The article contains no benchmark numbers. Cold start time depends on your bundle, runtime and dependencies, so the only figure worth having is the one your own run produces.
What Fluid compute changes
Vercel’s Fluid compute page says it is enabled by default for new projects as of April 23, 2025. It lets multiple invocations share a single function instance, available for the Node.js and Python runtimes. The docs list optimized concurrency, dynamic scaling, bytecode caching and pre-warming of production instances among its features, and say it scales existing instances before it adds new ones.
For a load test, the consequence is that virtual users and function instances do not map one to one. Fifty concurrent virtual users do not need fifty instances. Several requests can run inside one instance, and Vercel prefers idle capacity it already has over new capacity. Vercel’s limits page lists concurrency as scaling automatically based on demand, with no fixed number to hit.
That changes what you watch. On a one-request-per-instance platform, a ramp exposes a concurrency ceiling. On Fluid compute, you watch latency per request as load rises, because two requests on one instance share its CPU. A route that spends its time waiting on a database shares well. A route that burns CPU on every request does not, and its latency climbs with load even though the platform keeps scaling.
Cold starts: what a test can and cannot show
A cold start happens when a request needs an instance that does not exist yet. Vercel’s cold start guide says to confirm that startup time is actually driving the latency you see before you change anything. If calls to external services or work inside the function dominate, fix those instead. Its own list of causes for fewer cold starts is optimized concurrency, bytecode caching, pre-warmed instances and automatic concurrency scaling.
Two of those only apply to production, and that matters for how you test:
- Vercel’s Fluid compute page says bytecode caching is applied to production environments, and is not available in development or preview deployments.
- The cold start guide says that on paid plans, production deployments keep instances warm and ready.
Vercel’s load-testing guide tells you to test a Staging or dedicated Preview deployment. That advice is right for safety and cost, and it means your cold start numbers come from an environment with fewer of the mitigations. Treat a Preview result as an upper bound for cold start frequency. If cold starts show up as a problem there, check production behaviour with a small, coordinated run before you decide the problem is real.
Test shapes that expose cold starts
A flat run at steady load hides cold starts, because after the first minute every request meets a warm instance. Three shapes surface them.
Idle, then ramp. Leave the deployment without traffic long enough for warm instances to go away, then start the ramp. Vercel does not document how long an instance stays warm, so do not guess. Check the cold start percentage in Vercel’s Observability, which the cold start guide names as the place to see it, and wait until it is high again.
Staged ramp. Climb in steps and hold each step. New instances appear as the load rises, and the first requests of each step carry the cold starts. Latency spikes at the step boundaries and settles inside the step.
Burst after quiet. Drop to a trickle, then return to the target. This is the shape of a campaign email or a cron job fan-out.
A Taurus scenario for the staged ramp looks like this:
execution: - scenario: api concurrency: 50 ramp-up: 5m hold-for: 10m
scenarios: api: headers: x-vercel-protection-bypass: ${__env(SECRET_VERCEL_BYPASS)} requests: - url: https://your-preview-url.vercel.app/api/products label: GET products - url: https://your-preview-url.vercel.app/api/categories label: GET categoriesThe header line is the bypass described in the how-to. The values for concurrency, ramp-up and hold-for are placeholders, and Vercel’s guide says to ramp gradually and coordinate before significant load.
Reading cold starts in the results
Open the run’s Request stats tab and read latency per label. Cold starts appear as a spread between the typical response time and the slowest responses on a label, and as a slow first stretch of the run. The aggregate average hides both.

The Request stats tab: one row per label. Compare each label’s max and 99th percentile columns with its median. This is a seeded demo run against a demo shop, not a Vercel deployment, so read the layout and not the numbers. The spread in this demo run is not a cold-start measurement.
Run the same scenario twice, once right after an idle period and once after a few minutes of warm traffic, and compare the two per label. The difference is the cost of a cold start on your code, and you can read it off two rows instead of estimating it.
MaxoPerf reports response times per label and does not mark which requests hit a cold instance. To connect slow requests to cold starts, compare the run’s timing with the cold start percentage over the same window in Vercel’s Observability.
Region distance
Vercel’s Functions run in a single region by default, iad1 (Washington, D.C.), for all new projects. The region documentation advises placing functions near your data and warns that regions far from your external services increase latency. A route that makes three sequential database calls pays the distance three times.
A load test shows this as a latency floor that does not move with load. If every request on a label is slow even at the first ramp step, scale is not the cause. It is the path from the function to the data. The fix is to move the function region or the database, and a ramp will not reveal it any faster than a single request does.
Limits that a test can hit
Vercel’s limits page lists the limits with Fluid compute enabled. Three matter for load tests:
- Maximum duration. The default is 300 seconds on every plan. The maximum is 300 seconds on Hobby and 800 seconds on Pro and Enterprise. A function that exceeds its duration returns a
504with the codeFUNCTION_INVOCATION_TIMEOUT. - Memory. Functions default to 2 GB and 1 vCPU. Pro and Enterprise can raise the maximum to 4 GB and 2 vCPU.
- File descriptors. Vercel Functions have 1,024 shared across all concurrent executions, and the runtime uses some. Network connections and database connections count against that number.
The last one links to the next section. A route that opens a new connection per request can exhaust that budget under load. The symptom is a rise in errors on that route’s label, which you can open in the run’s Errors tab.
Database connections per instance
Because instances serve several requests at once, a connection pool per instance is the pattern that fits. Vercel’s connection pooling guide says to create the pool in global scope so multiple requests within an instance can reuse it, to use the attachDatabasePool helper so idle connections close before an instance suspends, and to use a short idle timeout (its example is 5 seconds). It warns against a maximum pool size of 1, which does not reduce total connections and harms concurrency on Fluid compute.
For a load test, this gives you three things to check. Does the database’s connection count track the number of instances rather than the number of requests? Does it fall back after the run, or does it stay high because idle connections linger? Does the error rate rise at a specific ramp step because the database hit its connection limit? Run the database’s own connection and wait metrics next to the run, since the load tool only sees the symptoms.
Cost of the test
Instances that serve requests incur usage even when the code waits on I/O: Vercel’s pricing page says Provisioned Memory is billed for the instance lifetime and keeps billing during I/O, while Active CPU pauses while code waits. Estimate the Vercel bill from a load test turns a run’s totals into figures.
What to take from a run
A useful result states the per-label latency at the first stage and at the last, the difference between a cold and a warm start of the same scenario, the region the functions ran in, the database connection count at peak and the errors by label. Those five facts describe how your code behaves on Vercel’s runtime, and every one of them can change when you move a region, shrink a bundle or fix a pool.