| name | vercel-load-scale |
| description | Load test and scale Vercel deployments with concurrency tuning and capacity planning.
Use when running performance tests, planning for traffic spikes,
or optimizing serverless function scaling on Vercel.
Trigger with phrases like "vercel load test", "vercel scale",
"vercel performance test", "vercel capacity", "vercel benchmark".
|
| allowed-tools | Read, Write, Edit, Bash(npx:*), Bash(vercel:*), Bash(curl:*) |
| version | 1.18.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","vercel","testing","performance","scaling"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Vercel Load & Scale
Overview
Load test Vercel deployments to identify scaling limits, cold start impact, and concurrency thresholds. Covers k6/autocannon test scripts, Vercel's auto-scaling model, Fluid Compute concurrency, and capacity planning.
Prerequisites
- Load testing tool: k6, autocannon, or artillery
- Test environment deployment (never load test production without approval)
- Access to Vercel Analytics for monitoring during tests
Instructions
Step 1: Understand Vercel's Scaling Model
Vercel serverless functions scale automatically:
| Behavior | Details |
|---|
| Scale-up | New function instances spawn on demand |
| Scale-down | Idle instances shut down after ~15 minutes |
| Cold starts | First request to a new instance pays initialization cost |
| Concurrency | Each instance handles one request at a time (by default) |
| Fluid Compute | Pro/Enterprise: multiple requests per instance |
Concurrency limits by plan:
| Plan | Max Concurrent Functions |
|---|
| Hobby | 10 |
| Pro | 1,000 |
| Enterprise | 100,000 |
Step 2: Basic Load Test with autocannon
npm install -g autocannon
autocannon -c 50 -d 30 https://my-app-preview.vercel.app/api/endpoint
Step 3: k6 Load Test Script
import http from 'k6/http';
import { check, sleep } from 'k6';
{ , } ;
errorRate = ();
coldStartRate = ();
latency = ();
options = {
: [
{ : , : },
{ : , : },
{ : , : },
{ : , : },
],
: {
: [],
: [],
},
};
() {
res = http.();
(res, {
: r. === ,
: r.. < ,
});
errorRate.(res. !== );
latency.(res..);
(res.[] === ) {
coldStartRate.();
}
();
}