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

Limiting total number of requests #684

Open
rsiatka opened this issue Feb 28, 2024 · 4 comments
Open

Limiting total number of requests #684

rsiatka opened this issue Feb 28, 2024 · 4 comments

Comments

@rsiatka
Copy link

rsiatka commented Feb 28, 2024

Question

Hi,
I can see that for vegeta the main condition to stop the simulation is time (-duration param). But is there an option to stop the simulation after reaching a certain number of sent requests?
For example, tools such as: ab, oha, hey in addition to duration, have a parameter -n that is limiting number of requests to run - when this value is reached the simulation ends.

@noboruma
Copy link

@rsiatka what about the -rate option?
You can limit like: -rate=100/s and do -duration=10s which should give you 1000 requests in total

@rsiatka
Copy link
Author

rsiatka commented Mar 12, 2024

Thank you @noboruma.
The solution with rate limit definitely helps. In my test scenario i'm trying to test application using closed workload model - sending 1M requests in shortest possible time using 1 connection only. I was hoping there is an option to detect max possible throughput automatically for such scenario but of course i can establish the value repeating the test several times for a different duration and rate.
Thanks a lot.

@noboruma
Copy link

You're welcome @rsiatka
You can only assess after trying what was the highest rate achievable.
There are many factors that will impact your network connectivity (your NIC, the state of the network, the distance, and so on). So even if you ask for 1M RPS, the tool might not be able to provide you the requested rate depending on physical constraints.

To limit the unknowns, try to test on a private network and always record how many requests were successful.

@rsiatka
Copy link
Author

rsiatka commented Mar 12, 2024

Yes @noboruma, totally agree. In order to simplify the tests and reduce the factors causing uncertainty, I have disabled the NIC and testing my service on localhost first, actually on 127.0.0.1 because vegeta, in the absence of a card, cannot resolve localhost on winows. Getting Get http://localhost:999: lookup localhost on [::1]:53: read udp [::1]:50813->[::1]:53: i/o timeout

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

2 participants