Skip to main content
← CONCEPTS / SOFTWARE QUALITY & TESTING
An end-to-end domain learning journey

Load, Soak &
Spike Testing.

Load, soak, and spike testing validate how a system behaves under sustained target throughput, multi-hour resource pressure, and sudden traffic cliffs using realistic protocol mixes and open-workload generators.
Start the journey7 sections· Last modified Oct 23, 2026
FIRST PRINCIPLES. PRODUCTION SCALE.
The idea to keep with you

When traffic spikes expose hidden coupling, Soak & Spike Testing, load tests prove capacity, soak tests expose slow leaks, and spike tests reveal autoscaling lag and queue collapse—provided your generator uses an open arrival-rate model to avoid Coordinated Omission.

TL;DR30-second simplified summary
▾

Core Mechanics: Performance testing validates non-functional SLOs under three distinct traffic profiles: Load Test: ramps smoothly (e.g., 500 to 5,000 RPS over 15 min) to map the knee of the throughput-vs-p99 latency curve.

Visual & Structural Flow: Depicts Open-Model Arrival Rate vs. Closed-Loop Coordinated Omission (Open Generator (k6) -> Gateway / Queue -> Service (5s GC Pause) -> HdrHistogram); Capacity Knee -> Endurance Soak -> Spike Recovery Gate (LOAD RAMP -> SOAK (75%) -> SPIKE (10x)).

Trade-Offs & Production: Select the workload model and duration that match the failure mode you are hunting. Production performance harnesses distribute open-model runners across multiple nodes (with tuned net.ipv4.ip_local_port_range) and correlate client HdrHistogram percentiles.

Failure Modes & Application: Dive deeper into Coordinated Omission, HPA tuning, and ephemeral port exhaustion.

Before you begin · Building blocksAlready know these? Jump to Stage 01 ↓
Consumer-Driven Contract Testing & Chaos Engineering
Combining Consumer-Driven Contract Testing (schema and state compatibility) with Chaos Engineering (fault injection, latency, and packet loss) to prove distributed services neither miscommunicate nor cascade-fail under stress.
Full walkthrough · 7 stages
01
STAGE 01 · WHAT IT ISL4 · FUNDAMENTALS

What are Load, Soak, and Spike Tests.

Why this matters: The mechanism: understand how Load, Soak, and Spike Tests works from first principles.

Performance testing validates non-functional SLOs under three distinct traffic profiles:

  • Load Test: ramps smoothly (e.g., 500 to 5,000 RPS over 15 min) to map the knee of the throughput-vs-p99 latency curve.
  • Soak (Endurance) Test: holds 70%–85% of peak load for 8–72 hours to catch slow memory leaks (2–5 MB/hr), connection-pool leaks, or disk/WAL bloat.
Workload Modeling

Open-Model Arrival Rate vs. Closed-Loop Coordinated Omission

Open Generator (k6)Gateway / QueueService (5s GCPause)HdrHistogram1. Fire fixed 1,000 RPS regardless2. 5s GC stall -> queue backs up3. Record true queue + servicetime4. No hidden pause = accurate p99

Open-model generators decouple request arrival from server latency, exposing queueing explosions that closed VU loops hide.

02
STAGE 02 · WHY WE NEED ITL4 · FUNDAMENTALS

Why 1-RPS functional tests miss Coordinated Omission and leaks.

Why this matters: The problem: see what breaks without Why 1-RPS functional tests miss Coordinated Omission and leaks under real concurrency or scale.

Functional tests pass at 1 RPS while production outages happen when HikariCP pools saturate, GC pauses compound, or flash-sale traffic arrives faster than Kubernetes HPA can boot pods.

Two measurement traps invalidate naive benchmarks: Coordinated Omission (closed-loop virtual users pause sending while waiting on a slow response, hiding 5-second GC stalls from p99) and Load Generator Bottlenecks (the test runner exhausts its own ephemeral TIME_WAIT ports before the server saturates).

Lifecycle & Failure Recovery

Why 1-RPS functional tests miss Coordinated Omission and leaks

admitsucceedbudget exceededInitializedProcessingInvariant MetDegraded Fallback
Engineering Decision Framework
Problem
How to implement Load, Soak & Spike Testing without hitting unbounded tail latency, state divergence, or operational fragility.
Naive Solution
Use a single unpartitioned path with unbounded retries and synchronous global coordination.
Why It Fails
Global coordination serializes throughput under load, while unbounded retries amplify transient stalls into full outages.
Alternatives
Compare synchronous strict-consistency paths against bounded asynchronous replication, local caching, or partitioned ownership.
Engineering Decision
When traffic spikes expose hidden coupling, soak & Spike Testing, load tests prove capacity, soak tests expose slow leaks, and spike tests reveal autoscaling lag and queue collapse—provided your generator uses an open arrival-rate model to avoid Coordinated Omission.
Trade-Offs
Gains predictable p99 latency and fault isolation in exchange for explicit bounding, observability, and slightly higher implementation complexity.
Decision Exercise · Make the Call

When Load, Soak & Spike Testing experiences a sudden 5x traffic spike alongside a slow downstream dependency, which engineering choice best protects system stability?

Track Intended vs. Actual Send Time

Use open constant-arrival-rate executors (k6, Vegeta) or HdrHistogram correction so queued requests count toward tail latency.

Monitor the Generator Itself

Watch generator CPU, NIC drops, and ip_local_port_range so you never mistake client port exhaustion for server capacity.

03
STAGE 03 · WHERE IT IS USEDL5 · APPLIED DESIGN

Where Performance Suites belong (and where they do not).

Why this matters: Scope boundary: identify where this pattern fits best and where simpler or async alternatives win.

Think of Where Performance Suites belong (and where they do not) as the intuition layer for Load, Soak & Spike Testing: Scope boundary: identify where this pattern fits best and where simpler or async alternatives win.

Run targeted load/soak/spike tests before major infra shifts or predictable traffic cliffs.

ChoiceWhat it buysWhat it costs
Good Candidate: Infra Upgrades & Flash SalesValidates TLS 1.3/HTTP/2 upgrades, schema changes, and 5x–20x market-open or ticket-drop bursts.Requires isolated staging parity and realistic protocol/payload mixes.
Avoid: Shared Prod DBs or Unstable LogicFix unit/contract correctness first; never blast shared prod databases or live payment APIs without sandboxes.Can corrupt prod data or trigger third-party rate-limit bans.
04
STAGE 04 · HOW IT IS MANAGEDL5 · APPLIED DESIGN

Configuring Open-Workload Ramp, Spike & Abort Thresholds in k6.

Why this matters: Operational control: configure bounds, failure handling, and safe production defaults.

Think of Configuring Open-Workload Ramp, Spike & Abort Thresholds in k6 as the intuition layer for Load, Soak & Spike Testing: Operational control: configure bounds, failure handling, and safe production defaults.

Use ramping-arrival-rate with preAllocatedVUs and maxVUs caps plus strict thresholds that abort if error rates spike.

Component Topology

Configuring Open-Workload Ramp, Spike & Abort Thresholds in k6

CalleringressRouter / APIcomputeProcessorstorageState Layercontrolrequestdispatchread/write
import http from 'k6/http';
import { check } from 'k6';

export const options = {
  scenarios: {
    open_spike: {
      executor: 'ramping-arrival-rate',
      startRate: 200, timeUnit: '1s',
      preAllocatedVUs: 100, maxVUs: 2000,
      stages: [
        { target: 500, duration: '5m' },   // Steady load
        { target: 4000, duration: '30s' }, // 8x traffic cliff
        { target: 500, duration: '5m' },   // Recovery check
      ],
    },
  },
  thresholds: {
    http_req_duration: ['p(99)<350'],
    http_req_failed: [{ threshold: 'rate<0.01', abortOnFail: true }],
  },
};

export default function () {
  const res = http.get('https://staging.example.com/api/v1/catalog');
  check(res, { 'status 200': (r) => r.status === 200 });
}
05
STAGE 05 · ALTERNATIVESL6 · SCALE & TRADE-OFFS

Alternatives: Open vs. Closed Workload & Short vs. Multi-Hour Soak.

Why this matters: The trade-off: compare competing approaches across latency, consistency, and operational cost.

Think of Alternatives: Open vs. Closed Workload & Short vs. Multi-Hour Soak as the intuition layer for Load, Soak & Spike Testing: The trade-off: compare competing approaches across latency, consistency, and operational cost.

Select the workload model and duration that match the failure mode you are hunting.

ChoiceWhat it buysWhat it costs
Open-Workload Model (Fixed RPS)Reveals true queueing explosions and tail latency when the server slows.Can rapidly overwhelm fragile staging environments without `maxVUs` caps.
Closed-Workload Model (Fixed VUs)Models bounded internal worker pools or finite concurrent browser tabs.Suffers Coordinated Omission for public internet traffic.
Multi-Hour Soak (8–72h) vs. 15-Min LoadCatches slow heap leaks, unclosed HikariCP connections, and WAL/log-disk fill.Delays CI/CD and burns cloud staging budget; run nightly/pre-release.
06
STAGE 06 · PRODUCTION ARCHITECTUREL7 · STAFF / PRINCIPAL

Distributed Load Mesh + SLO Telemetry Gate.

Why this matters: Production architecture: see how the components compose end to end under real load.

Think of Distributed Load Mesh + SLO Telemetry Gate as the intuition layer for Load, Soak & Spike Testing: Production architecture: see how the components compose end to end under real load.

Production performance harnesses distribute open-model runners across multiple nodes (with tuned net.ipv4.ip_local_port_range) and correlate client HdrHistogram percentiles against server-side Prometheus/OTel metrics (GC pause, pool wait, HPA pod-boot lag).

Test Progression

Capacity Knee -> Endurance Soak -> Spike Recovery Gate

p99 < SLOFlat heap & FDTune HPA & re-testLOAD RAMPFind p99 kneeSOAK (75%)8-72h leak checkSPIKE (10x)HPA + shed recovery

Passing all three profiles verifies steady-state capacity, leak-free endurance, and graceful burst recovery.

07
STAGE 07 · PROBLEMS SOLVED & FURTHER DEEP DIVEL7 · STAFF / PRINCIPAL

Related Reliability Problems & Concepts.

Why this matters: Applied problems: connect these internals to concrete system design and debugging scenarios.

Think of Related Reliability Problems & Concepts as the intuition layer for Load, Soak & Spike Testing: Applied problems: connect these internals to concrete system design and debugging scenarios.

Dive deeper into Coordinated Omission, HPA tuning, and ephemeral port exhaustion.

Practice · Explain the consequences

Practice: Make the trade-off yourself.

Question 1 of 3
Score: 0/3

What is Coordinated Omission in load testing, and how do you avoid it?

Recommended Learning Flow