I'm currently working on a college project for "Distributed Systems" in a Windows environment, aiming to develop an automatic load balancing system using Locust 2.20.0 for testing. The primary goal is to dynamically scale workers based on the load, but I'm encountering several challenges.
High Ping in Locust 2.20.0:
I'm using Locust version 2.20.0 for load testing on my local Windows machine with 10 users. During test runs, I've noticed unusually high ping times, impacting overall performance. Here are the relevant details:
Locust Version: 2.20.0 Test Environment: Windows Number of Users: 10 I've already tried changing the logic for my worker and reducing logging, but the ping times remain consistently high. Are there Windows-specific strategies to optimize ping times in Locust 2.20.0 for a local environment, or could this be indicative of a deeper issue?
Load Balancer Scaling Issues:
In addition to the high ping problem, my main focus is on creating an automatic load balancing system. Here are the details for this aspect:
Load Balancer Software: FastAPI My goal is to have the load balancer dynamically scale workers based on the load. If the load is too high on one worker, it should scale up; if it's too low, it should scale down. Are there Windows-specific considerations or configurations I should review to achieve this automatic worker scaling in a local development environment?
Code and Repository:
I've included key components of my project on GitHub. Here's the repository link: https://github.com/PapicMarko/Distributed_LoadBalancer.git
Specifically, I'm seeking insights into the following files:
load_balancer.py, worker.py, load_test.py
Testing and Troubleshooting:
I've tried testing the /test endpoint with a minimal number of users. Endpoints /worker-health and /load-balancer-health seem to work well with low ping times (around 2-5 ms). Attempted to use cProfile for profiling but faced challenges in understanding how to apply it correctly to my code. Any guidance or insights into resolving these issues collectively in a Windows development environment would be greatly appreciated. Thanks in advance for your help!