Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Running distributed load tests with k6

Running distributed load tests with k6

This talk originally presented at the Kubernetes & Cloud Native STL meetup, October 20, 2022 in St. Louis, USA.

Observability and CI/CD are must-haves in cloud-native environments. At their core, both are about enabling humans and machines to understand their code and workloads more deeply. Reliability testing should be part of CI/CD feeding into your observability stack, but until recently, there were mainly paid download or SaaS solutions on the market.

Grafana's k6 reliability testing tool allows you to load test your applications, validate your API contracts, and perform end-to-end browser tests. With k6-operator, you can now run distributed tests within your Kubernetes cluster.

We will walk through setting up a k6-operator, how to configure your tests using JavaScript, and how to visualize the results in Grafana alongside your real-world production data.

Paul Balogh

October 20, 2022
Tweet

More Decks by Paul Balogh

Other Decks in Technology

Transcript

  1. 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
  2. Overview 1 2 3 4 What is k6? What is

    load testing? Introducing the k6-operator Where do we go from here?
  3. Integration Testing Contract Testing k6: a reliability testing tool Browser

    Automation (E2E) Load Testing Functional Testing Chaos Testing
  4. 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
  5. 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
  6. Overview 1 2 3 4 What is k6? What is

    load testing? Introducing the k6-operator Where do we go from here?
  7. Load testing is the process of putting demand on a

    system and measuring its response. The Internet Knower of all things
  8. • 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
  9. Constant Arrival Rate Ramping Arrival Rate Ramping VUs Per VU

    iterations Constant VUs Shared iterations Modeling your load tests
  10. Overview 1 2 3 4 What is k6? What is

    load testing? Introducing the k6-operator Where do we go from here?
  11. Same k6 test script, multiple execution modes! Custom Resource Definition

    (CRD) launcher kubectl create cm test-scripts –from-file=script.js
  12. Overview 1 2 3 4 What is k6? What is

    load testing? Introducing the k6-operator Where do we go from here?
  13. The “Golden Signals” Network quality, Geolocation Special events, Cyber attacks

    Bugs, 500s, Security/Auth Underprovisioning, Infra issues
  14. Pre-production Production Virtual User traffic Real User traffic Virtual User

    traffic System in Pre-prod System in production Proactively improve reliability
  15. 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!