-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Rate-Limiting is not handled gracefully #52
Comments
Hiyo! Good catch! Completely agreed! There might be some complexity though - A few initial thoughts:
Anyhow! Totally open to ideas and PRs : D this would definitely be handy Cheers! |
So, a little bit of empirical testing appears to suggest that Slack's rate-limiting is using an algorithm similar to the leaky bucket algorithm, with a bucket size of 25 requests and a leak rate of 1 request per second. (I can reliably get around 30 requests in over a course of 5 seconds.) My thoughts on how to handle rate-limiting on the client side are as follows:
|
Slack's API has a rate-limit of one message per second. PowerShell/PSSlack overruns even the (unspecified) burst-limit rather quickly, and doesn't make any attempt at waiting/re-trying the request.
Even more concerning is that Slack appears to threaten revoking API tokens if an application continues to send messages while being rate-limited.
It would likely be best to augment
Send-SlackApi
to be mindful of the burst/average rate-limit, and gracefully recover from HTTP 429 API responses.The text was updated successfully, but these errors were encountered: