| name | replit-load-scale |
| description | Load test and scale Replit deployments with Autoscale tuning, Reserved VM sizing, and capacity planning.
Use when load testing Replit apps, optimizing Autoscale behavior,
or planning capacity for production traffic.
Trigger with phrases like "replit load test", "replit scale",
"replit capacity", "replit performance test", "replit autoscale tuning".
|
| allowed-tools | Read, Write, Edit, Bash(npx:*), Bash(curl:*) |
| version | 1.12.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","replit","testing","performance","scaling"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Replit Load & Scale
Overview
Load testing, scaling strategies, and capacity planning for Replit deployments. Covers Autoscale behavior tuning, Reserved VM right-sizing, cold start optimization, database connection scaling, and capacity benchmarking.
Prerequisites
- Replit app deployed (Autoscale or Reserved VM)
- Load testing tool: k6, autocannon, or curl
- Health endpoint implemented
Replit Scaling Model
| Deployment Type | Scaling Behavior | Cold Start | Best For |
|---|
| Autoscale | 0 to N instances based on traffic | Yes (5-30s) | Variable traffic |
| Reserved VM | Fixed resources, always-on | No | Consistent traffic |
| Static | CDN-backed, infinite scale | No | Frontend assets |
Instructions
Step 1: Baseline Benchmark
npx autocannon -c 10 -d 30 https://your-app.replit.app/health
Step 2: Load Test with k6
import http from 'k6/http';
import { check, sleep } from 'k6';
import { Rate, Trend } from 'k6/metrics';
const errorRate = new Rate();
coldStartTrend = ();
options = {
: [
{ : , : },
{ : , : },
{ : , : },
{ : , : },
],
: {
: [],
: [],
},
};
= __ENV. || ;
() {
healthRes = http.();
(healthRes, {
: r. === ,
: r.. < ,
});
errorRate.(healthRes. !== );
(healthRes.. > ) {
coldStartTrend.(healthRes..);
}
apiRes = http.();
(apiRes, {
: r. === ,
});
();
}