k6 load testing

Define throughput and concurrency

Easy30 pts~12 min
  • Throughput
  • Concurrency
  • Little's law
Practice app · Checkout Service

A load-testable checkout service with realistic latency that degrades under concurrency, plus a live metrics view.

BASE_URL
/api/practice
Console app
/lab/performance-testing-define-throughput-and-concurrency

Your starter code already declares BASE_URL — call the API relative to it.

Objective

Drive a fixed concurrency with a fixed pacing and observe the resulting throughput.

Your task

  1. 1Set options { vus: 10, duration: '10s' }.
  2. 2Each iteration: GET BASE_URL + "/perf/checkout", check status 200, then sleep(1).
  3. 3Expect roughly vus ÷ iteration time ≈ 8 requests/s; note the actual rate from the summary.

Acceptance criteria

  • GET /perf/checkout returns 200
  • Think time is used
  • ≥ 50 requests are sent
  • At least 50 check() calls pass

Constraints

  • Runner limits: ≤ 50 VUs, ≤ 400 requests and ≤ 20 s per run — size options accordingly.

k6 load testing · Performance Testing · Foundations