Increase default rate limits to 1MB per second, 16MB burst

This commit is contained in:
Mike Dilger 2024-07-14 12:38:44 +12:00
parent 1f1a74e442
commit 3f5600638b
3 changed files with 14 additions and 12 deletions

View File

@ -272,12 +272,13 @@ timeout_seconds = 60
max_connections_per_ip = 5
# The maximum rate (excluding bursts) of data that will be accepted over a websocket connection
# (per connection). Beyond this rate (in a sustained way) the connection will be closed.
# The maximum rate (excluding bursts) of data that will be transmitted over a websocket connection
# (both directions, per connection). Beyond this rate (in a sustained way) the connection will be
# closed.
#
# Default is 131072 bytes per second.
# Default is 1024576 bytes per second.
#
throttling_bytes_per_second = 131072
throttling_bytes_per_second = 1024576
# The allowable bursts of data beyond the normal rate.
@ -287,6 +288,6 @@ throttling_bytes_per_second = 131072
# second. If that bucket doesn't have enough, the burst won't be allowed and the connection
# will be closed.
#
# Default is 4194304 bytes.
# Default is 16777216 bytes.
#
throttling_burst = 4194304
throttling_burst = 16777216

View File

@ -237,10 +237,11 @@ Default is 5
### throttling_bytes_per_second
The maximum rate (excluding bursts) of data that will be accepted over a websocket connection
(per connection). Beyond this rate (in a sustained way) the connection will be closed.
The maximum rate (excluding bursts) of data that will be transmitted over a websocket connection
(both directions, per connection). Beyond this rate (in a sustained way) the connection will be
closed.
Default is 131072 bytes per second.
Default is 1024576 bytes per second.
### throttling_burst
@ -251,4 +252,4 @@ As bytes are consumed the count goes down, but we refund throttling_bytes_per_se
second. If that bucket doesn't have enough, the burst won't be allowed and the connection
will be closed.
Default is 4194304 bytes.
Default is 16777216 bytes.

View File

@ -73,8 +73,8 @@ impl Default for FriendlyConfig {
minimum_ban_seconds: 1,
timeout_seconds: 60,
max_connections_per_ip: 5,
throttling_bytes_per_second: 1024 * 128,
throttling_burst: 1024 * 1024 * 4,
throttling_bytes_per_second: 1024 * 1024,
throttling_burst: 1024 * 1024 * 16,
}
}
}