Choosing Between Virtual Users and Arrival Rate in k6 for Throughput Control
Learn when to use Virtual Users versus Arrival Rate executors in k6 to avoid coordinated omission and ensure stable throughput during performance benchmarks.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn when to use Virtual Users versus Arrival Rate executors in k6 to avoid coordinated omission and ensure stable throughput during performance benchmarks.
Learn how to use k6 thresholds to turn HTTP latency measurements into clear pass/fail signals for your load tests and CI pipelines.
Preventing Accidental Public Access in k6 Cloud Tests When running k6 load tests that target the cloud service, there's a risk of unintentionally exposing test scripts and results publicly. The k6 cloud command makes tests visible by default unless explicitly configured otherwise. Two documented approaches exist for preventing this exposure: using the K6_CLO
Goal Determine whether k6 should extend its HTTP module with built‑in token refresh logic to automatically handle expired bearer tokens or API keys during a load test. Constraints The current core runtime leaves authentication entirely to the test script; adding automatic refresh would introduce runtime dependencies, version‑sensitive behavior, and potential
k6 Threshold Evaluation Timing The precise goal is to configure k6 load tests to reliably signal performance regressions without generating excessive alert noise from transient metric spikes. Constraints and Uncertainty The current uncertainty involves balancing immediate failure detection against the need to filter out short-lived anomalies using abortOnFai
Goal Determine how k6 evaluates tag‑based thresholds when the referenced tag is absent from a metric, and whether the script loader error path influences that evaluation. Constraints & Uncertainty The documented error string “k6: [ERROR] Cannot load test script” is used to trigger the loader failure, but the impact on threshold processing is not clearly
k6 Cloud result uploads rely on an API token passed via environment variable — historically K6_CLOUD_TOKEN , now aligned with K6_TOKEN — but the runtime does not validate token lifetime locally, nor does it refresh tokens automatically. When a token expires or is revoked, the upload fails with a generic cloud error that does not distinguish authentication ex
We need to load a large dataset from an API that exposes pagination via ?page=1&size=50 . The test must iterate over all pages until a nextPage token disappears. Two documented approaches exist in k6: (1) a manual loop that updates the page token or number on each iteration, and (2) a data‑driven method that reads a CSV or JSON file of page tokens and us
When designing performance tests in k6, managing request timeouts is essential to prevent hanging VU (Virtual User) iterations and to accurately measure service degradation. k6 provides two primary methods for controlling these durations: a global timeout property within the options object and granular overrides passed directly into individual http.request c