specify rate-limit algorithm exceptions #5605
Replies: 2 comments 3 replies
-
This discussion may be relevant to the following users. Context: |
Beta Was this translation helpful? Give feedback.
2 replies
-
Alternatively, if exceptions will never be specified, feel free to state that. However, this implies that per-resource rate limits were never meant to be adhered to. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There is an issue that needs to be addressed by Discord regarding per-resource rate limits.
TL:DR Optimal Implementations require a consistent specification; which currently is confirmed to be inconsistent due to unstated exceptions.
Context
The context of this entire thread can be found from the following issues.
A summary is that Discord Rate Limits Documentation is missing information which prevents API Wrappers from providing optimal API Consumers. Discord punishes the end user for not adhering to rate limits such that the end user must implement them. Yet the specification is confirmed to have "mistakes and exceptions". Mistakes happen. That is fine. Then there are the exceptions...
Symptom
switchupcb/disgo#22 showcases the implications of having exceptions in relation to a modern optimal rate limit implementation. In summary, a secure working rate limit implementation is possible with the current rate limit specification, but can't be optimal in a few cases due to "exceptions".
As an example, top-level resources are defined as
channels (channel_id), guilds (guild_id), and webhooks (webhook_id or webhook_id + webhook_token)
and routes that use them at the start of the request path are specified as per-resource rate-limit algorithm routes accordingly. Aninvite
is not a per-resource route according to the specification, but confirmed by @devsnek to be one anyways. The implications of these exceptions (incorrectly specified resources) can result in memory overhead to Bot Users (costing them money) or — in prevention of those issues — result in inefficient bots.Solution
In order to solve this problem, Bot Users Need Exceptions to the Rate Limit Algorithm Specification Specified. If the documentation states that per-resource routes only apply to "xyz" (
channel, guilds, webhooks
), but then also applies the per-resource route "r" (invites
) this is inconsistent. State thatr
is an exception in the documentation for the end-user.Beta Was this translation helpful? Give feedback.
All reactions