Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Increase default join burst ratelimiting (#9674)
Browse files Browse the repository at this point in the history
It's legitimate behaviour to try and join a bunch of rooms at once.
  • Loading branch information
erikjohnston authored Mar 23, 2021
1 parent 0caf2a3 commit e550ab1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions changelog.d/9674.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Increase default join ratelimiting burst rate.
4 changes: 2 additions & 2 deletions docs/sample_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -869,10 +869,10 @@ log_config: "CONFDIR/SERVERNAME.log.config"
#rc_joins:
# local:
# per_second: 0.1
# burst_count: 3
# burst_count: 10
# remote:
# per_second: 0.01
# burst_count: 3
# burst_count: 10
#
#rc_3pid_validation:
# per_second: 0.003
Expand Down
8 changes: 4 additions & 4 deletions synapse/config/ratelimiting.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ def read_config(self, config, **kwargs):

self.rc_joins_local = RateLimitConfig(
config.get("rc_joins", {}).get("local", {}),
defaults={"per_second": 0.1, "burst_count": 3},
defaults={"per_second": 0.1, "burst_count": 10},
)
self.rc_joins_remote = RateLimitConfig(
config.get("rc_joins", {}).get("remote", {}),
defaults={"per_second": 0.01, "burst_count": 3},
defaults={"per_second": 0.01, "burst_count": 10},
)

# Ratelimit cross-user key requests:
Expand Down Expand Up @@ -187,10 +187,10 @@ def generate_config_section(self, **kwargs):
#rc_joins:
# local:
# per_second: 0.1
# burst_count: 3
# burst_count: 10
# remote:
# per_second: 0.01
# burst_count: 3
# burst_count: 10
#
#rc_3pid_validation:
# per_second: 0.003
Expand Down

0 comments on commit e550ab1

Please sign in to comment.