Been puzzling over how to write my end of automated jobs that hit 3rd party apis.
I was making my own solution, but it seemed weak - cache a counter, add one, limit, wait.
Searching had not been finding posts on rate limiting from the consuming side. Then searched on network traffic and found Token Buckets. Though the demo looked too simple, reversing it found that instead of +1 to a counter (where the system needs to know the max) it counts down to 0, making it easier to keep limit control in the system as all can look down to 0.