%% date:: [[2023-03-17]] %% # [[system/cards/Emergent load testing - Rules for organized chaos]] ## Details Conference:: [[KubeCon Europe 2023]] Date:: [[2023-04-19]] Length:: 35 minutes ## Abstract #### Abstract (1300 character max) When we write load testing scripts against our applications, we write them sequentially: A, then B, then C. But this doesn't accurately reflect the organized chaos of a system in production, nor does it prepare the system for the unexpected. Emergence is a phenomenon where parts of a whole independently develop properties not originally present in the whole. Emergence is what helps ant workers develop roles without leadership, prompts animals to evolve adaptive traits without forethought, and facilitate non-toxic communities without moderators. The growing field of emergent software applies this swarm logic to the programs that we write. What would it take to write emergent load testing scripts? It turns out that there are a few ingredients for emergence: a large population size, opportunities to interact, feedback, and an element of control. In this talk, Nicole van der Hoeven discusses how to bring these elements to load testing by writing a script in Grafana k6 that can independently decide what requests to make next, modify Kubernetes app pods, and disrupt services based on a continual feed of results during runtime-- all without manual intervention. She shows how to wield this new breed of load testing to improve confidence in the complex systems we build. #### Benefits to the Ecosystem (1000 character max) Microservices-based architectures, near-infinite scaling on the cloud, and declarative programming have changed the way the systems we build have been structured, but there haven't been proportional changes to the way we *test* those systems. Even chaos testing, which extends the scope of testing, still requires manual intervention and manual interpretation of results. In short, our testing is not adaptive. This lack of adaptation puts us at greater risk of overestimating what our applications can handle. In this talk, I intend to demonstrate a new class of test scripts that react to changes during test execution that we might not have foreseen and actively try to reproduce performance bottlenecks that we might not have found or scripted for. My goal is to arm attendees with the tools (using an open source, cloud native stack) to write smarter load tests that are up to the challenge of modern systems. #### Additional Resources ##### Personal Website List of speaking engagements on personal website, along with videos: https://nicolevanderhoeven.com/speaking/ ##### Presentation Recording Recording of "In search of the best Pokémon: browser automation and performance testing in one script with k6" (Automation Guild 2022): https://www.youtube.com/watch?v=SFag8ggkXKo ##### Other YouTube channels: https://youtube.com/@nicolevdh (personal) and livestreams: https://www.youtube.com/c/k6test/streams (for k6) ## Structure - distributed - self-organizing (don't just run from A > Z); they are conditional - xk6-kubernetes: - xk6-disruptor - k6-operator - evolve - Change based on the previous results (thresholds) ## The presentation [[Emergent load testing - Rules for organized chaos - KubeCon EU 2023]] - Suggestion from [[Pepe Cano]]: Use xk6-kubernetes to stand up a testing environment