rate.md (1691B)
1 --- 2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3 SPDX-License-Identifier: curl 4 Long: rate 5 Arg: <max request rate> 6 Help: Request rate for serial transfers 7 Category: connection global 8 Added: 7.84.0 9 Multi: single 10 Scope: global 11 See-also: 12 - limit-rate 13 - retry-delay 14 Example: 15 - --rate 2/s $URL ... 16 - --rate 3/h $URL ... 17 - --rate 14/m $URL ... 18 --- 19 20 # `--rate` 21 22 Specify the maximum transfer frequency you allow curl to use - in number of 23 transfer starts per time unit (sometimes called request rate). Without this 24 option, curl starts the next transfer as fast as possible. 25 26 If given several URLs and a transfer completes faster than the allowed rate, 27 curl waits until the next transfer is started to maintain the requested 28 rate. This option has no effect when --parallel is used. 29 30 The request rate is provided as "N/U" where N is an integer number and U is a 31 time unit. Supported units are 's' (second), 'm' (minute), 'h' (hour) and 'd' 32 /(day, as in a 24 hour unit). The default time unit, if no "/U" is provided, 33 is number of transfers per hour. 34 35 If curl is told to allow 10 requests per minute, it does not start the next 36 request until 6 seconds have elapsed since the previous transfer was started. 37 38 This function uses millisecond resolution. If the allowed frequency is set 39 more than 1000 per second, it instead runs unrestricted. 40 41 When retrying transfers, enabled with --retry, the separate retry delay logic 42 is used and not this setting. 43 44 Starting in version 8.10.0, you can specify the number of time units in the rate 45 expression. Make curl do no more than 5 transfers per 15 seconds with "5/15s" 46 or limit it to 3 transfers per 4 hours with "3/4h". No spaces allowed.