diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-07-05 11:10:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-05 11:10:19 +0100 |
commit | 9481707a52a89022bc5d99c181ceb9e7ec9ec9e9 (patch) | |
tree | 08e06996e3f794da5acfcc266c27ddf5f48e8dd8 /synapse/config/ratelimiting.py | |
parent | Make errors about email password resets much clearer (#5616) (diff) | |
download | synapse-9481707a52a89022bc5d99c181ceb9e7ec9ec9e9.tar.xz |
Fixes to the federation rate limiter (#5621)
- Put the default window_size back to 1000ms (broken by #5181) - Make the `rc_federation` config actually do something - fix an off-by-one error in the 'concurrent' limit - Avoid creating an unused `_PerHostRatelimiter` object for every single incoming request
Diffstat (limited to 'synapse/config/ratelimiting.py')
-rw-r--r-- | synapse/config/ratelimiting.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/config/ratelimiting.py b/synapse/config/ratelimiting.py index 8c587f3fd2..33f31cf213 100644 --- a/synapse/config/ratelimiting.py +++ b/synapse/config/ratelimiting.py @@ -23,7 +23,7 @@ class RateLimitConfig(object): class FederationRateLimitConfig(object): _items_and_default = { - "window_size": 10000, + "window_size": 1000, "sleep_limit": 10, "sleep_delay": 500, "reject_limit": 50, @@ -54,7 +54,7 @@ class RatelimitConfig(Config): # Load the new-style federation config, if it exists. Otherwise, fall # back to the old method. - if "federation_rc" in config: + if "rc_federation" in config: self.rc_federation = FederationRateLimitConfig(**config["rc_federation"]) else: self.rc_federation = FederationRateLimitConfig( |