node-canvas-api icon indicating copy to clipboard operation
node-canvas-api copied to clipboard

Better rate-limiting implementation

Open justin0022 opened this issue 3 years ago • 0 comments

Current rate-limiting is static, relying on https://www.npmjs.com/package/bottleneck, instead of dynamically throttling depending on the X-Rate-Limit-Remaining header on the response.

Implementing proper rate-limiting will:

  1. Improve performance, potentially dramatically.
  2. Reduce chance of accidentally hitting the rate limit when making batch changes and causing an absolute headache because it becomes difficult to determine which requests succeeded and which requests failed (as happened recently to me when running https://github.com/ubccapico/restore-speedgrader-comments.

justin0022 avatar Mar 23 '21 21:03 justin0022