Paul Balogh Developer Advocate, k6 OSS @javaducky Running distributed load tests with k6
By bringing k6 and Grafana together, we enable teams to radically improve the time to prevent, detect, and remediate problems before they impact end users. Raj Dutt Grafana Labs CEO/Co-founder
Overview 1 2 3 4 What is k6? What is load testing? Introducing the k6-operator Where do we go from here?
A reliability testing tool.
Integration Testing Contract Testing k6: a reliability testing tool Browser Automation (E2E) Load Testing Functional Testing Chaos Testing
Although it’s easy to get started with k6 [OSS] all on its own, it really shines with its ease of integration into a developer ecosystem. Thoughtworks Technology Radar April 2021
OSS is at the heart of what we do and helps leave the world a little better than we found it CLI and API designed for automating your tests with pass/fail criteria using JavaScript syntax A k6 engine written in Go making it one of the the best performing tools available Use Go(lang) code to add support for new outputs, protocols, and products from within your test scripts OpenSource Scriptable Performant Extensible k6: a reliability testing tool
JAVASCRIPT RUNTIME GOJA (https://github.com/dop251/goja) GO xk6 EXTENSIONS k6: a reliability testing tool JAVASCRIPT
Overview 1 2 3 4 What is k6? What is load testing? Introducing the k6-operator Where do we go from here?
Load testing is the process of putting demand on a system and measuring its response. The Internet Knower of all things
● Performance testing == load testing ● It is only for large companies ● Is expensive to do ● Should only be in production ● Unnecessary if you have o11y Myths about load testing
UX Why do load testing today?
Why do load testing today? SLOs Proactively test
Common types of load tests Average and Peak test Soak test Spike test Breakpoint test
Constant Arrival Rate Ramping Arrival Rate Ramping VUs Per VU iterations Constant VUs Shared iterations Modeling your load tests
Overview 1 2 3 4 What is k6? What is load testing? Introducing the k6-operator Where do we go from here?
Same k6 test script, multiple execution modes! Custom Resource Definition (CRD) launcher kubectl create cm test-scripts –from-file=script.js
57 configurable options → https://k6.io/docs/using-k6/k6-options/reference/ CLI flags ENV variables Script options Default Config file Order of preference Worker nodes
Overview 1 2 3 4 What is k6? What is load testing? Introducing the k6-operator Where do we go from here?
The “Golden Signals” Network quality, Geolocation Special events, Cyber attacks Bugs, 500s, Security/Auth Underprovisioning, Infra issues
Pre-production Production Virtual User traffic Real User traffic Virtual User traffic System in Pre-prod System in production Proactively improve reliability
k6.io/slack grafana/k6 community.k6.io Connect with Paul as @javaducky or linkedin/in/pabalogh Demonstration project available at github.com/javaducky/demo-k6-operator Thanks for participating!

Running distributed load tests with k6

  • 1.
    Paul Balogh Developer Advocate,k6 OSS @javaducky Running distributed load tests with k6
  • 2.
    By bringing k6and Grafana together, we enable teams to radically improve the time to prevent, detect, and remediate problems before they impact end users. Raj Dutt Grafana Labs CEO/Co-founder
  • 3.
    Overview 1 2 3 4 What is k6? Whatis load testing? Introducing the k6-operator Where do we go from here?
  • 4.
  • 5.
    Integration Testing Contract Testing k6: a reliabilitytesting tool Browser Automation (E2E) Load Testing Functional Testing Chaos Testing
  • 6.
    Although it’s easyto get started with k6 [OSS] all on its own, it really shines with its ease of integration into a developer ecosystem. Thoughtworks Technology Radar April 2021
  • 7.
    OSS is atthe heart of what we do and helps leave the world a little better than we found it CLI and API designed for automating your tests with pass/fail criteria using JavaScript syntax A k6 engine written in Go making it one of the the best performing tools available Use Go(lang) code to add support for new outputs, protocols, and products from within your test scripts OpenSource Scriptable Performant Extensible k6: a reliability testing tool
  • 8.
    JAVASCRIPT RUNTIME GOJA (https://github.com/dop251/goja) GO xk6EXTENSIONS k6: a reliability testing tool JAVASCRIPT
  • 9.
    Overview 1 2 3 4 What is k6? Whatis load testing? Introducing the k6-operator Where do we go from here?
  • 10.
    Load testing isthe process of putting demand on a system and measuring its response. The Internet Knower of all things
  • 11.
    ● Performance testing== load testing ● It is only for large companies ● Is expensive to do ● Should only be in production ● Unnecessary if you have o11y Myths about load testing
  • 12.
    UX Why do loadtesting today?
  • 13.
    Why do loadtesting today? SLOs Proactively test
  • 14.
    Common types ofload tests Average and Peak test Soak test Spike test Breakpoint test
  • 15.
    Constant Arrival Rate RampingArrival Rate Ramping VUs Per VU iterations Constant VUs Shared iterations Modeling your load tests
  • 16.
    Overview 1 2 3 4 What is k6? Whatis load testing? Introducing the k6-operator Where do we go from here?
  • 17.
    Same k6 testscript, multiple execution modes! Custom Resource Definition (CRD) launcher kubectl create cm test-scripts –from-file=script.js
  • 19.
    57 configurable options→ https://k6.io/docs/using-k6/k6-options/reference/ CLI flags ENV variables Script options Default Config file Order of preference Worker nodes
  • 21.
    Overview 1 2 3 4 What is k6? Whatis load testing? Introducing the k6-operator Where do we go from here?
  • 22.
    The “Golden Signals” Networkquality, Geolocation Special events, Cyber attacks Bugs, 500s, Security/Auth Underprovisioning, Infra issues
  • 23.
    Pre-production Production Virtual User traffic RealUser traffic Virtual User traffic System in Pre-prod System in production Proactively improve reliability
  • 24.
    k6.io/slack grafana/k6 community.k6.io Connectwith Paul as @javaducky or linkedin/in/pabalogh Demonstration project available at github.com/javaducky/demo-k6-operator Thanks for participating!