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

Support for asynchronous requests #1079

Closed
stevecj opened this issue Sep 4, 2019 · 3 comments
Closed

Support for asynchronous requests #1079

stevecj opened this issue Sep 4, 2019 · 3 comments

Comments

@stevecj
Copy link

stevecj commented Sep 4, 2019

There is no way for a single client to make multiple, overlapping requests like what a JavaScript client would be likely to do.

It would be nice if Locust could take advantage of some sort of cooperative multitasking (e.g. Twisted) to allow a client to start multiple requests at nearly the same time and to handle responses in the order in which they are received (callbacks, Promises, or whatever).

I realize this is by no means a small request, and I will certainly understand if this is simply not going to happen. I thought I should ask regardless though.

@aldenpeterson-wf
Copy link
Contributor

You can write custom clients for this if you want - we use a custom client that I've occasionally done this with.

Do you mean building this into Locust itself? Vs using a custom client?

@stevecj
Copy link
Author

stevecj commented Sep 4, 2019

Perhaps, I'm not thinking cleverly enough, but I'm not sure that Locust, in its current form, can handle an asynchronous request model. A single client could have multiple overlapping chains of tasks, each waiting on a pending request.

@heyman
Copy link
Member

heyman commented Oct 17, 2019

You should be able to simulate such scenario by spawning your own greenlet "threads" within a locust task.

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

4 participants