parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question: --limit tool?


From: lists . gnu . org+parallel
Subject: Question: --limit tool?
Date: Mon, 27 Apr 2020 12:31:17 -0700
User-agent: Roundcube Webmail/1.3.10

Hello Parallelizers!

I'm using GNU Parallel to run the AWS CLI utility, and I want to use Parallel's --limit option to avoid being throttled.

Before I sit down and write something, has anybody already invented this wheel?

Essentially, AWS has a token-bucket rate-limiting system:

* Every API has two numbers associated with it: a bucket size (integer) and a refill rate (integer). 

* Every second, the bucket's value is incremented by the second number, until it reaches the first number. 

* Every unthrottled request decrements the bucket's value by one. 

* If the bucket's value is zero, requests are denied with a throttling error.

The script would emulate this logic, and given the two numbers (bucket size and rate) return a '1' if a throttling error would occur and a '0' otherwise.

It would be nice if the script could auto-detect the two numbers, but it's unclear how that could be done without being throttled at least twice.  Maybe it could analyze the job log of a previous run?

Thanks!

--

reply via email to

[Prev in Thread] Current Thread [Next in Thread]