-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
curl: add --rate to set max request rate per time unit #8671
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
Conversation
what's with the slash? how about 12s 5m 1h. or if you're worried 5m will be confused with limit-rate then how about --request-rate 5min |
The slash looks better IMHO. Consider what happens when you read it: "12s" is "12 seconds", where "12/s" is "12 per second" kinda without thinking. So without the slash "12s" would be like "once every 12 seconds" to me, which is not what the option does, right? |
Yes, my thinking was exactly what @jzakrzewski said here. |
Yes you're right. Though I still like --request-rate. Why is the option limited to serial transfers? |
I was considering that, but then I wasn't sure if request is really the best term when speaking other protocols than HTTP as well - it would perhaps be better with
How would it work for parallel? I couldn't think of how it should work so I left that out until we can figure that out. |
This comment was marked as abuse.
This comment was marked as abuse.
--rate "12/m" - for 12 per minute or --rate "5/h" - for 5 per hour Removed from TODO Closes #8671
Hi! Your new parameter still requires manual interaction, i.e. user has to know and set proper rate limiting on their own. Any chance to implement support for |
Correct (and note that you link to an outdated version of the draft). I'm going for simplicity to start with. If we want curl to adapt to what the response headers' say, then I think we should make that an explicit instruction for the Something to keep in mind when thinking of letting it adapt to what the server says: as this rate frequency feature is implemented now, it works independently of which servers curl speaks to. It means that you could do |
--rate "12/m" - for 12 per minute or --rate "5/h" - for 5 per hour Removed from TODO Closes #8671
--rate "12/m" - for 12 per minute or --rate "5/h" - for 5 per hour Removed from TODO Closes #8671
--rate "12/m" - for 12 per minute or
--rate "5/h" - for 5 per hour
This option is only for serial transfers, when curl is told to do more than one request.