Scaling Heights: Mastering Load Testing in Python with Locust

vivek keshore (~vivek17)


6

Votes

Description:

Abstract

How often it happens that the applications crashes under the unexpected load? Does APIs performance remain same at different levels of load? What is the impact on success/failure and the response time when the app is loaded with multiple simultaneous users? These are some of the questions that can cause nightmares in developers. In this 30-minute talk, let's explore the world of load testing and performance enhancement with the aid of Locust. Locust is a simple to use yet extremely powerful tool, that can help with load testing with a simple Python script. It reveals how well the APIs or the app holds up when faced with a surge in demand. Locust, a robust and open-source Python tool, enables the power to simulate the actions of thousands of users engaging with your application all at once. This dynamic approach uncovers weak points, enabling developers to fine-tune the application APIs for flawless operation even during the most intense usage. In this talk, let's explore the world of Locust, and learn its powerful features to perform load testing. The test results would help in streamlining the application for unexpected loads, enhance the app's performance, and create a smooth and satisfying user experience.

Outline of the Talk

1. Understanding Load Testing (4 mins):

  • Intro to load testing
  • Why it's crucial for ensuring application reliability and scalability

2. Introduction to Locust (3 mins):

  • Intro to Locust - The load testing ally.
  • Advantages and why it's a game-changer for Python enthusiasts.

3. Installation and Setup (5 mins)

  • Installing and configuring Locust for the project
  • Getting ready for the first test run.

4. Designing and Implementing Tests (8 minutes):

  • Implementing the Python script
  • Create load tests for APIs as normal methods
  • Explore various options and parameters
  • Guidelines and tips to write load tests

5. Executing Tests (2 minutes):

  • Creating user scenarios, setting load levels
  • Executing tests to simulate real-world usage

6. Interpreting Test Results (3 minutes):

  • Analyse the test results
  • Analyse the data generated by Locust
  • Identify performance bottlenecks
  • Make informed optimisations.

7. Key Takeaways - Conclusion (2 mins)

8. QnA

Prerequisites:

Basic knowledge of Python.

Speaker Info:

I am a Python Enthusiast who loves building software applications and education related content. I am a technology professional and a passionate programmer with 11 years of experience in Python & Python related technologies. I am currently working as Architect at SenecaGlobal Inc, Hyderabad.

I have been involved with multiple professional projects in various industrial domains and technical fields. My expertise is in application development, data processing & analysis, data structures, & algorithms, various non-relational and relational databases, Python, Flask, FastAPI, Celery, RabbitMQ, Redis, Cassandra, AWS, Airflow, and various other tech stacks. I am also an open source contributor, and published self developed libraries on PyPI. I love creating libraries and various utility tools that help me in solving a challenge/problem that could also be used by others in the developers community.

My personal interest is in exploring new technologies, web application development, IoT systems, spread Python education, and read novels. I also write and share my thoughts occasionally on Quora and Medium.

Speaker Links:

Previous Proposals

  • https://in.pycon.org/cfp/2021/proposals/hows-the-job-title-quantum-computer-programmer~bmZQr/
  • https://in.pycon.org/cfp/2021/proposals/one-api-to-rule-them-all-config-based-development~en5rE/

PyPI Libraries

And many more in progress ...

Docker HUB

Rhinestone

Medium Articles (Published in NerdForTech and MLearning.ai)

https://vivek-keshore.medium.com

Github

Github

LinkedIn

LinkedIn

Section: Developer tools and automation
Type: Talks
Target Audience: Beginner
Last Updated: