Skip to content

RenoDeCorte/locust-in-k8s-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Locust in a k8s cluster

What is Locust?

Locust is an open-source, distributed, and scalable load testing tool used for measuring the performance and scalability of web applications. It is typically used to simulate thousands or even millions of users, known as "virtual users," to generate a load on the application and observe its behavior under different conditions.

Why deploy it in a kubernetes cluster?

When deployed on Kubernetes, Locust can be configured to run multiple worker nodes, allowing for even greater scalability and load generation. Kubernetes provides a highly available and scalable platform for running Locust, and makes it easy to spin up additional worker nodes as needed to handle large-scale load testing scenarios.

What is this project?

This is a locust setup in a k8s cluster, with 1 master and 2 worker nodes. The number of worker nodes can be changed in locust-worker.yaml, line 8 if desired.

[DIAGRAM HERE]

How do I set this up?!

The following demo is for setting up a cluster locally, using k3d. This could also be done using minikube or even in the cloud.
NOTE: when setting up this cluster in the cloud, you would need to create a yaml file for a load balancer listening on port 8089.
Please refer to your cloud providers documentation.

Prerequisites

Have following installed on your computer

✔️ Docker
✔️ Minikube / k3d / MicroK8s... (if deploying locally)
✔️ A k8s cluster in AWS / google cloud / Azure... (if deploying in the cloud)
✔️ kubectl

Let's do this!

git clone https://github.com/RenoDeCorte/locust-in-k8s-cluster.git
cd locust-in-k8s-cluster
./locust.sh

Wait for a few minutes and visit localhost:8089. You should see the locust interface with 2 workers:

212499824-8ac238de-a881-4918-8664-f7ab60891d97

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published