Gabriel Boorse

Gabriel works remotely for a San Francisco startup as a Senior Software Engineer and primarily uses JVM languages to get the job done. He has been, however, a longtime supporter of the Python community and enjoys writing Python wherever possible. Ask him about the pros and cons of Java versus Python and why he thinks that light themes are truly the better choice!

An Intro to Load Testing with Locust and Python

DevOps, Testing, & Automation, Scale & Performance, Beginner
8/17/2019 | 1:30 PM-2:00 PM | Boardroom

Description

Puzzling over performance problems in production? Baffling backend bugs bending your brain? Unleash a plague of Locusts on your web app to devour performance problems, permanently! In this talk, you will learn how to leverage Locust for load testing RESTful services and more.

Abstract

Overview:

Locust is an open source Python library that you can use to identify bottlenecks in your code by pummeling your programs with tens, hundreds, or even thousands of separate workers. Using Locust, we can simulate the kinds of continuous traffic that web applications experience out in the wild. This kind of load testing, like any other contraption in the tester's toolbox, plays a critical role in the process of delivering robust, stable, and battle-tested software.

Come to this talk for a practical, ground-level intro to load testing, writing a locustfile.py, and debugging the kinds of problems that arise while hammering an application with hundreds or even thousands of requests per minute for the very first time. Additionally, we will dig into ways that you can get the most out of Locust's built-in reporting mechanisms and randomize incoming traffic for more realistic testing scenarios. Finally, I will demonstrate a distributed load test using multiple agent servers and a controller.

So what are you waiting for? Create a calamity of Biblical scale and arrange your application's apocalypse... for science!

Warning: bad puns and ample alliteration are fair game during this talk.

Outline:

  • What is load testing, and why do I need to use it?
    • Simulating users
    • Discovering operational capacity and breaking points
    • Knowing the consequences of your code!
  • What are the differences between functional and load testing?
    • Perfect results are secondary
    • The secret to successful load testing: You don't want these tests to pass!
  • Why is load testing so important when developing software today?
    • Running applications at scale and knowing when to allocate resources
    • Graceful failures and fault tolerance
    • BREAK ALL THE THINGS.
  • Writing your first locustfile.py
    • Defining a set of tasks
    • Randomizing tasks and setting weights
    • Executing tasks in sequence
    • Understanding the results of a load test and debugging common problems
  • Distributed load testing
    • Using an agent/controller architecture to coordinate requests
    • Options for monitoring applications at scale
  • A brief intro to testing applications that aren't RESTful services