From be019b286bb150e3792926a49ff129b58d36ce56 Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Thu, 22 Jul 2021 08:47:25 +0300 Subject: [PATCH] Reword throttling doc Co-authored-by: Adam Johnson --- docs/api-guide/throttling.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api-guide/throttling.md b/docs/api-guide/throttling.md index f3183ba67..996ceb203 100644 --- a/docs/api-guide/throttling.md +++ b/docs/api-guide/throttling.md @@ -94,9 +94,9 @@ You'll need to remember to also set your custom throttle class in the `'DEFAULT_ ## A note on concurrency -Since the default implementations of throttles are based on the Django cache system, concurrent requests may be able to bypass throttling due to [race conditions][race]. +The built-in throttle implementations are open to [race conditions][race], so under high concurrency they may allow a few extra requests through. -If your project requires more rock-solid throttles even in concurrent situations, you may need to implement such a throttle by hand. See [this issue][gh5181] for details. +If your project relies on guaranteeing the number of requests during concurrent requests, you will need to implement your own throttle class. See [issue #5181][gh5181] for more details. --- @@ -207,4 +207,4 @@ The following is an example of a rate throttle, that will randomly throttle 1 in [cache-setting]: https://docs.djangoproject.com/en/stable/ref/settings/#caches [cache-docs]: https://docs.djangoproject.com/en/stable/topics/cache/#setting-up-the-cache [gh5181]: https://github.com/encode/django-rest-framework/issues/5181 -[race]: https://en.wikipedia.org/wiki/Race_condition#Data_race \ No newline at end of file +[race]: https://en.wikipedia.org/wiki/Race_condition#Data_race