Skip to content

Commit aabb62e

Browse files
Removing 2 distracting scenarios
Reason: Too many numbers are only distracting from the message - anybody can image that all numbers are just arbitrary examples... Other problem: The axis legends "1 hour window" in the SVG are overlapping: https://symfony.com/doc/5.4/rate_limiter.html#fixed-window-rate-limiter Maybe either reduce the font size, or reword to just "window"
1 parent 9e11eea commit aabb62e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

rate_limiter.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ Fixed Window Rate Limiter
3535
~~~~~~~~~~~~~~~~~~~~~~~~~
3636

3737
This is the simplest technique and it's based on setting a limit for a given
38-
interval of time (e.g. 5,000 requests per hour or 3 login attempts every 15
39-
minutes).
38+
interval of time.
4039

4140
In the diagram below, the limit is set to "5 tokens per hour". Each window
4241
starts at the first hit (i.e. 10:15, 11:30 and 12:30). As soon as there are
@@ -48,11 +47,11 @@ squares).
4847
<object data="_images/rate_limiter/fixed_window.svg" type="image/svg+xml"></object>
4948

5049
Its main drawback is that resource usage is not evenly distributed in time and
51-
it can overload the server at the window edges. In the previous example,
50+
it can overload the server at the window edges. In this example,
5251
there were 6 accepted requests between 11:00 and 12:00.
5352

5453
This is more significant with bigger limits. For instance, with 5,000 requests
55-
per hour, a user could make the 4,999 requests in the last minute of some
54+
per hour, a user could make 4,999 requests in the last minute of some
5655
hour and another 5,000 requests during the first minute of the next hour,
5756
making 9,999 requests in total in two minutes and possibly overloading the
5857
server. These periods of excessive usage are called "bursts".

0 commit comments

Comments
 (0)