mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 08:29:59 +03:00
Reword throttling doc
Co-authored-by: Adam Johnson <me@adamj.eu>
This commit is contained in:
parent
7f8e92a230
commit
be019b286b
|
@ -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
|
||||
[race]: https://en.wikipedia.org/wiki/Race_condition#Data_race
|
||||
|
|
Loading…
Reference in New Issue
Block a user