summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-03-02 11:33:45 +0000
committerErik Johnston <erik@matrix.org>2015-03-02 11:33:45 +0000
commit9d9b230501915c326136567349b0995623c48a21 (patch)
treef77af0dd7fe8310b5ed173a7777e7e5ae986b91b /synapse/federation
parentMove federation rate limiting out of transport layer (diff)
downloadsynapse-9d9b230501915c326136567349b0995623c48a21.tar.xz
Make the federation server ratelimiting configurable.
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/transport/__init__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/federation/transport/__init__.py b/synapse/federation/transport/__init__.py
index f0283b5105..2a671b9aec 100644
--- a/synapse/federation/transport/__init__.py
+++ b/synapse/federation/transport/__init__.py
@@ -66,9 +66,9 @@ class TransportLayer(TransportLayerServer, TransportLayerClient):
 
         self.ratelimiter = FederationRateLimiter(
             self.clock,
-            window_size=10000,
-            sleep_limit=10,
-            sleep_msec=500,
-            reject_limit=50,
-            concurrent_requests=3,
+            window_size=homeserver.config.federation_rc_window_size,
+            sleep_limit=homeserver.config.federation_rc_sleep_limit,
+            sleep_msec=homeserver.config.federation_rc_sleep_delay,
+            reject_limit=homeserver.config.federation_rc_reject_limit,
+            concurrent_requests=homeserver.config.federation_rc_concurrent,
         )