Users are not distributed equally across workers.
See original GitHub issueDescribe the bug
Running locust in k8s across hundreds of workers, I peeked the workers UI tab and wondered why do some workers report to run several users, when most of the cluster is still not running a single user.
Expected behavior
I expected the users to be equally distributed across my workers
Actual behavior
I ran this test with 600 workers
Steps to reproduce
I guess it reproduces with a high number of workers?
Environment
- OS: k8s
- Python version: locust latest official docker image
- Locust version: locust latest official docker image
- Locust command line that you ran:
args: ["-f", "/loadtest/locustfile.py", "--worker", "--master-host", "locust-master"]
- Locust file contents (anonymized if necessary):
from locust import HttpUser, task
import subprocess
class LoadTestUser(HttpUser):
@task
def do_test(self):
urlfile = subprocess.check_output(["bash", "-c", "find /loadtest/urlfiles -type f | shuf | head -n 1"]).rstrip()
with open(urlfile) as f:
urls = [l.rstrip() for l in f.readlines()]
for u in urls:
self.client.get(u, verify=False)
Basically the test fetches a random url list for a single flow in our system, and probes all the URLs.
Issue Analytics
- State:
- Created a year ago
- Comments:10
Top Results From Across the Web
Make Sure Your Team's Workload Is Divided Fairly
How do you make sure that work on your team is evenly distributed? What do you do about the person who's great at...
Read more >Talent Is Equally Distributed, But Opportunity Is Not.
“There is a common saying that talent is equally distributed, but opportunity is not,” says Beth Mily, chief executive officer of Geekwise ...
Read more >Unequal Power: How the assumption of equal bargaining ...
The assumption of equal power—the idea that if workers don't like a job, they are free to work elsewhere and this prevents exploitation—enables...
Read more >Talent Is Equally Distributed, But Opportunity Is Not
Ultimately, we must come around to the idea that the talent among us is distributed equally, but the opportunity isn't. When we can...
Read more >Q 18. Are U.S. unemployment rates dist... [FREE SOLUTION]
No, the unemployment rate is not distributed evenly in the US economy. ... we see across different groups of people based on gender,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK setting my cluster with pod affinity so every locust worker get a core and the master get a private node did the trick.
Closing the issue for now, although it looks like running workers in big numbers requires some tricks to the heartbeat mechanism.
well, I wouldnt be so sure, but it is very possible.