API Throttling

209 views
Skip to first unread message

Ryan Hiebert

unread,
May 22, 2015, 12:52:32 PM5/22/15
to canvas-l...@googlegroups.com
https://canvas.instructure.com/doc/api/file.throttling.html

It's not clear to me whether requests that have been denied due to throttling -- i.e. return a 403 Forbidden (Rate Limit Exceeded) response -- will affect the rate limit themselves.

For my use-case, I need to make a _ton_ of read-only API calls. They need to happen just as fast as Canvas lets me make them, so I've got quite a few workers working on it. If I get throttled and I immediately requeue the task in my job queue, it's possible that I'll immediately make additional requests to the API. Will this cause a recursive problem where things just _can't_ work, because the forbidden requests are keeping my quota used up?

Ryan

Jesse Poulos

unread,
Nov 29, 2016, 1:20:25 PM11/29/16
to Canvas LMS Users
Good question. A failed request will still count against your X-Rate-Limit-Remaining, however, a denied request will be really "cheap" since it takes very little time to process.

Given your use case, you should really be using Canvas Data to obtain the information you need. The Canvas API's were designed for interactive application more than bulk data transfers like you are trying to do.
Reply all
Reply to author
Forward
0 new messages