This talk was presented at PyBay2019 - 4th annual Bay Area Regional Python conference. See pybay.com for more details about PyBay and click SHOW MORE for more information about this talk.
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.
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.
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
About the speaker 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!
Sponsor Acknowledgement This and other PyBay2019 videos are via the help of our media partner AlphaVoice (https://www.alphavoice.io/)!
#pybay #pybay2019 #python #python3 #gdb