-
Notifications
You must be signed in to change notification settings - Fork 320
Open
Labels
a-apiImplementing specific parts of the Zulip server APIImplementing specific parts of the Zulip server API
Milestone
Description
The Zulip server rate-limits requests. By default the limit for each user is 200 per minute, in total across all types of requests. For an example where this came up, see #945 and its original report.
We'll resolve #945 by having fetchOlder specifically add backoff for the getMessages requests we make there. But then a further bonus refinement would be for us to understand when the server is specifically giving us rate-limiting errors, and follow its instructions for how long to wait before making another request.
For docs on the rate-limiting errors:
- Partial documentation is here: https://zulip.com/api/rest-error-handling#rate-limit-exceeded
- Some other aspects appear here: https://zulip.com/api/http-headers#rate-limiting-response-headers
- Though we don't seem to have this part documented, the HTTP status code is 429, which is standard: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429
To do this right, this logic belongs on ApiConnection. That way the information can be shared across all the different requests we make on behalf of a given account.
Metadata
Metadata
Assignees
Labels
a-apiImplementing specific parts of the Zulip server APIImplementing specific parts of the Zulip server API
Type
Projects
Status
No status