Load testing applies a controlled, realistic volume of traffic to an application to see how it behaves under the demand you expect. The goal is to measure response times, throughput, and errors at that level, and to find the point where performance starts to degrade.
Why it matters
A site that is fast with ten visitors can fail with a thousand. Testing before a launch, a sale, or a marketing push turns capacity from a guess into a number, and exposes bottlenecks such as an undersized database pool or a slow query.
Example
A simple k6 script ramps traffic up and checks a latency target:
import http from "k6/http";
export const options = {
stages: [{ duration: "2m", target: 100 }, { duration: "5m", target: 100 }],
thresholds: { http_req_duration: ["p(95)<800"] },
};
export default function () { http.get("https://staging.example.com/"); }
The test fails if the 95th percentile response time exceeds 800 ms.
Common mistakes
- Testing production without warning anyone, which can trigger real alerts or take the site down. Test staging, or agree on a window.
- Hitting a single URL, which just tests the cache. Use a realistic mix of pages and logged-in flows.
- Reporting averages instead of percentiles.
- Running the load generator from a machine that is itself the bottleneck.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.