How to auto scale Locust in Kubernetes

4/20/2020

I couldn't find any information on autoscaling for Locust worker pods in kubernetes, and I've tried to deploy a horizontal pod autoscaler for the workers but noticed that the newly spun up pods were not assigned any workload.

I've read these on the autoscaling for Locust but failed to find the actual implementation of it:

https://github.com/locustio/locust/issues/1066

https://github.com/locustio/locust/issues/1143

https://github.com/locustio/locust/issues/1168

Current the only workaround I found is to scale up the number of pods prior to the loadtest based on GCP's documentation which is not the most ideal solution. (https://cloud.google.com/solutions/distributed-load-testing-using-gke)

Any insight is much appreciated!

-- Jeff Tsai
autoscaling
kubernetes
locust

0 Answers