import http from 'k6/http';
import { check, sleep } from 'k6';
// Gradually increase load to find the breaking point
export const options = {
stages: [
{ duration: '2m', target: 50 },
{ duration: '2m', target: 100 },
{ duration: '2m', target: 150 },
{ duration: '2m', target: 200 }, // Free tier max
],
thresholds: {
http_req_duration: ['p(95)<1000'],
http_req_failed: ['rate<0.05'],
},
};
export default function () {
http.get('https://myapp.com');
sleep(1);
}Run progressively increasing load tests. When response times exceed your SLA or error rates spike above 1-5%, you've found your capacity limit. This is the point where you need to scale.
Before major launches, after significant architecture changes, and quarterly as a baseline check. Automated load tests in CI/CD can catch regressions early.
Stress test your website with up to 200 virtual users for free. Find performance bottlenecks and ensure your site handles traffic spikes.
Run extended soak tests to find memory leaks, connection pool exhaustion, and performance degradation over time.
Test how your application handles sudden traffic spikes. Simulate flash sales, viral moments, and DDoS-like scenarios safely.