talira

Grafana k6

Like unit testing, for performance

open sourceAGPL-3.0-onlyself-hostablefreeMCP

Grafana k6 is a load testing tool written in Go that runs test scripts written in JavaScript: virtual users make HTTP, WebSocket and gRPC requests or drive a Chromium browser, while thresholds turn latency and error rate goals into pass or fail results for CI. Scenarios model constant arrival rates, ramping users or fixed iterations, results go to the terminal summary, files or real-time outputs such as Prometheus remote write and OpenTelemetry, and extensions built with xk6 add protocols and outputs. The CLI is AGPL-3.0; Grafana Cloud k6 runs the same scripts from managed load zones in more than 20 locations with up to a million virtual users. Grafana Labs acquired k6 in 2021 and also makes k6 Studio, a desktop app that records tests.

Ways to install

Problems it solves

  • find out how many concurrent users our API can handle before latency falls apart
  • write load tests as code in JavaScript and keep them in the repo next to the service
  • fail the CI build when the p99 response time of an endpoint goes over 500 ms
  • simulate a traffic spike before Black Friday to see what breaks first
  • run a soak test for hours to catch memory leaks and slow degradation
  • generate a constant number of requests per second regardless of how slow responses get
  • load test a gRPC or WebSocket service, not just HTTP
  • measure Web Vitals of a page under load with real browser sessions
  • stream load test results into Prometheus and Grafana dashboards while the test runs
  • run a distributed load test from many geographic regions without managing load generators
  • test an internal service behind our firewall with load generated inside our network
  • replace our old JMeter XML test plans with something developers will actually maintain
  • compare performance between two releases and spot regressions
  • smoke test an API after each deploy with a few virtual users and checks
  • generate a load test script from a recorded user flow without writing code

View all 16 problems

Features

  • test scripts in JavaScript run by an embedded engine in a Go binary
  • HTTP, WebSockets, gRPC and browser (Chromium) testing
  • browser API modelled on Playwright, with Web Vitals and screenshots
  • checks and thresholds that fail a test run on SLO breaches
  • scenarios with open and closed models, constant arrival rate, ramping VUs and fixed iterations
  • end-of-test summary, CSV and JSON outputs
  • real-time outputs to Prometheus remote write, OpenTelemetry, InfluxDB, Datadog, Dynatrace, Elasticsearch, Kafka, New Relic, CloudWatch, StatsD and TimescaleDB
  • extensions for new protocols and outputs (xk6)
  • REST API to control a running test
  • Docker image, with a browser-enabled variant
View 3 more
  • Grafana Cloud k6: managed load zones in 20+ locations, Private Load Zones and up to 1 million concurrent VUs
  • Cloud Insights and test comparison in Grafana Cloud k6
  • experimental MCP server for validating, running and generating k6 scripts

Limitations

  • Doesn't run Node.js packages that use Node APIs such as fs or os: k6 runs JavaScript but isn't Node.js or a browser3

Ways to run it

Grafana k6

You run it, AGPL-3.0-only

free456

Not included

  • running tests from Grafana's managed load zones in more than 20 locations
  • Private Load Zones
  • Cloud Insights, which flags performance problems automatically

You arrange

  • machines to generate load, enough for the virtual users you need
  • a custom binary for any extensions
  • a metrics backend such as Prometheus or InfluxDB to keep results

Self-hosting docs

Grafana Cloud k6

Hosted by Grafana Labs

Free: 500 VUh/month; Pro: from $0.15/VUh with a $19/month platform fee that includes 500 VUh; Enterprise: from $25,000/year commit67

Only in this edition

  • load zones in more than 20 locations
  • Private Load Zones
  • Cloud Insights
  • up to 1 million concurrent VUs or 5 million requests per second
  • test comparison and trends
  • k6 results in Grafana dashboards

Pricing

Capabilities

Has an APIplan not known
Has a command line toolplan not known
Has an MCP serverplan not known
Takes pluginsplan not known

Alternatives

The same job

These do what Grafana k6 does.

  1. Gatling Modern load testing as code
  2. Artillery Full-stack performance and reliability testing: scalable API and Playwright load testing
  3. Locust An open source load testing tool: define user behaviour in plain Python and swarm your system with millions of simultaneous users
  4. oha HTTP load generator with a realtime terminal UI, inspired by hey
  5. Apache JMeter A 100% pure Java application designed to load test functional behavior and measure performance
  6. Vegeta HTTP load testing tool and library built to drill HTTP services with a constant request rate

Compare Grafana k6 with the top 3