Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slave client_id collisions in large environments #894

Closed
mattbailey opened this issue Sep 27, 2018 · 0 comments
Closed

slave client_id collisions in large environments #894

mattbailey opened this issue Sep 27, 2018 · 0 comments

Comments

@mattbailey
Copy link
Contributor

mattbailey commented Sep 27, 2018

I'm running 64 locust slave processes per host, and getting client_id collisions regularly.

self.client_id = socket.gethostname() + "_" + md5(str(time() + random.randint(0,10000)).encode('utf-8')).hexdigest()

The randomint here probably increases the chances of collisions, since it's added to a millisecond scale time function.

Recommend using uuid4() or uuid5(namespace, name) using the hostname as a namespace.

mattbailey added a commit to mattbailey/locust that referenced this issue Sep 27, 2018
Fixes locustio#894 

Current implementation collides easily in environments with large number of slave processes on the same host starting at the same time.
cgoldberg pushed a commit that referenced this issue Sep 28, 2018
Fixes #894 

Current implementation collides easily in environments with large number of slave processes on the same host starting at the same time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant