Optimize for consistency or latency with different ratelimiting modes.
remaining
response value is not always accurate in async mode for low frequency requests.
You should always use the returned success
value to determine if the request was allowed or not.success
respones would have matched a synchronous success
response and we observe 98% accuracy across all of our users.
If you have strict requirements for correctness, you should use the synchronous mode.
In all other cases, we recommend using the asynchronous mode to optimize for latency as that will give you the best performance and lowest latency for your users. Most of the time, your ratelimits will not get reached, so the small tradeoff in correctness is usually worth it for the performance gain. In case your API gets abused, the async mode will sync quickly due to the high frequency of requests and will stop the abuse quickly.