← Home ← Codex ← DEBT
Browse by Category
+ added · updated 7d
← Back to glossary

Load Testing

testing PHP 5.0+ Intermediate
debt(d9/e5/b5/t5)
d9 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'silent in production until users hit it' (d9). The detection_hints note 'No load test results in project history; performance only measured in production; unknown capacity limits' — the absence of load testing is invisible until real users trigger failures like 504 errors at peak traffic. None of the tools listed (k6, locust, gatling, jmeter, wrk) run automatically in a standard CI pipeline unless explicitly configured, so the gap goes completely unnoticed.

e5 Effort Remediation debt — work required to fix once spotted

Closest to 'touches multiple files / significant refactor in one component' (e5). The quick_fix suggests running k6 or Locust against staging, which sounds simple, but common_mistakes reveal the real remediation: setting up a production-like environment with realistic data volumes, fixing N+1 queries discovered under load, adjusting connection pool sizes, and resolving p99 latency issues. These fixes span infrastructure configuration, query optimisation, and application code — not a single-line patch.

b5 Burden Structural debt — long-term weight of choosing wrong

Closest to 'persistent productivity tax' (b5). Applies to web and API contexts broadly. The ongoing burden is that without load testing integrated into the release process, every major release carries hidden capacity risk. Teams must maintain staging environments with realistic data, configure load test tooling, and interpret results — this is a recurring cost across many work streams (development, QA, DevOps) rather than a localised one-component tax.

t5 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'notable trap (a documented gotcha most devs eventually learn)' (t5). The misconception field directly states the trap: developers believe load testing only matters for large applications, when in fact a single misconfigured query can fail a small app under tens of concurrent users. This is a well-known gotcha in the performance community but routinely surprises intermediate developers who equate scale with necessity.

About DEBT scoring →

Also Known As

stress testing performance testing k6 JMeter

TL;DR

Testing system behaviour under expected and peak load conditions to identify performance bottlenecks and breaking points before they affect users.

Explanation

Load testing generates concurrent requests to simulate production traffic levels. Types: load testing (expected peak), stress testing (find breaking point), soak testing (sustained load over hours), spike testing (sudden burst). Tools include k6 (JavaScript DSL), JMeter (Java GUI), and Locust (Python). Key metrics: requests per second, p95/p99 latency, error rate, and resource saturation. Results reveal N+1 queries, missing indexes, and connection pool exhaustion that unit tests cannot find.

Diagram

flowchart TD
    TOOL[k6 Gatling JMeter] --> SCENARIO[Test Scenario<br/>virtual users + ramp up]
    SCENARIO --> TARGET[Target system]
    TARGET --> METRICS[Collect metrics]
    subgraph Watch
        RESP[Response time p50 p95 p99]
        TPUT[Throughput req/s]
        ERR[Error rate pct]
    end
    METRICS --> RESP & TPUT & ERR
    subgraph Test_Types
        LOAD[Load test<br/>normal traffic]
        STRESS[Stress test<br/>beyond capacity]
        SPIKE[Spike test<br/>sudden burst]
        SOAK[Soak test<br/>extended duration]
    end
style TOOL fill:#1f6feb,color:#fff
style STRESS fill:#f85149,color:#fff
style LOAD fill:#238636,color:#fff
style SPIKE fill:#d29922,color:#fff

Common Misconception

Load testing only matters for large applications — a single misconfigured query can make a small app fail under tens of concurrent users, not thousands.

Why It Matters

Performance problems only emerge under load — an app that responds in 50ms in development may return 504 errors when 50 users hit it simultaneously if a connection pool is too small.

Common Mistakes

  • Not testing against a production-like environment with realistic data volumes.
  • Only measuring average response time — p99 latency reveals the worst user experience.
  • Not monitoring database query counts during load tests — N+1 patterns become obvious at scale.
  • Running load tests from a single machine — saturates the load generator, not the application server.

Code Examples

✗ Vulnerable
# No load test — assuming dev performance scales:
# Dev: 10ms response, 1 user
# Production launch: 200 concurrent users
# Result: DB connection pool exhausted (max 10 connections)
# All requests fail with 'Too many connections' — avoidable
✓ Fixed
# k6 load test — ramping up to 200 concurrent users:
import http from 'k6/http';
import { check } from 'k6';
export let options = {
  stages: [
    { duration: '30s', target: 50 },
    { duration: '1m',  target: 200 },
    { duration: '30s', target: 0 },
  ]
};
export default function() {
  let res = http.get('https://staging.example.com/api/users');
  check(res, { 'status 200': r => r.status === 200 });
}

Added 15 Mar 2026
Edited 22 Mar 2026
Views 34
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
1 ping T 0 pings W 0 pings T 1 ping F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W 0 pings T 0 pings F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W 1 ping T 0 pings F 2 pings S 0 pings S 0 pings M 0 pings T 0 pings W 1 ping T 0 pings F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W
No pings yet today
No pings yesterday
Amazonbot 7 Google 6 Perplexity 5 Ahrefs 3 ChatGPT 2 Majestic 1 Unknown AI 1 Meta AI 1
crawler 22 crawler_json 4
DEV INTEL Tools & Severity
🟡 Medium ⚙ Fix effort: Medium
⚡ Quick Fix
Run k6 or Locust against your staging environment before major releases — target your expected peak traffic × 1.5 and look for response time degradation, not just error rates
📦 Applies To
PHP 5.0+ web api
🔗 Prerequisites
🔍 Detection Hints
No load test results in project history; performance only measured in production; unknown capacity limits
Auto-detectable: ✓ Yes k6 locust gatling apache-jmeter wrk
⚠ Related Problems
🤖 AI Agent
Confidence: Low False Positives: High ✗ Manual fix Fix: High Context: File

✓ schema.org compliant