From a54180199eaad468ee321c56a2f7bd44836b779e Mon Sep 17 00:00:00 2001 From: cloudhead Date: Thu, 2 May 2024 13:10:32 +0200 Subject: [PATCH] node: Further increase the rate-limit defaults The rate-limitter gets hit on connect, due to historical gossip messages being exchanged. This results in a high initial burst that needs to be accounted for. --- radicle-cli/examples/rad-config.md | 8 ++++---- radicle-httpd/src/api/v1/profile.rs | 8 ++++---- radicle/src/node/config.rs | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/radicle-cli/examples/rad-config.md b/radicle-cli/examples/rad-config.md index 1697d22e..dda65e1c 100644 --- a/radicle-cli/examples/rad-config.md +++ b/radicle-cli/examples/rad-config.md @@ -38,12 +38,12 @@ $ rad config "maxOpenFiles": 4096, "rate": { "inbound": { - "fillRate": 2.0, - "capacity": 128 + "fillRate": 5.0, + "capacity": 1024 }, "outbound": { - "fillRate": 5.0, - "capacity": 256 + "fillRate": 10.0, + "capacity": 2048 } }, "connection": { diff --git a/radicle-httpd/src/api/v1/profile.rs b/radicle-httpd/src/api/v1/profile.rs index 827c2b54..5916f902 100644 --- a/radicle-httpd/src/api/v1/profile.rs +++ b/radicle-httpd/src/api/v1/profile.rs @@ -101,12 +101,12 @@ mod routes { "maxOpenFiles": 4096, "rate": { "inbound": { - "fillRate": 2.0, - "capacity": 128 + "fillRate": 5.0, + "capacity": 1024 }, "outbound": { - "fillRate": 5.0, - "capacity": 256 + "fillRate": 10.0, + "capacity": 2048 } }, "connection": { diff --git a/radicle/src/node/config.rs b/radicle/src/node/config.rs index fba4d058..40b826ab 100644 --- a/radicle/src/node/config.rs +++ b/radicle/src/node/config.rs @@ -168,12 +168,12 @@ impl Default for RateLimits { fn default() -> Self { Self { inbound: RateLimit { - fill_rate: 2.0, - capacity: 128, + fill_rate: 5.0, + capacity: 1024, }, outbound: RateLimit { - fill_rate: 5.0, - capacity: 256, + fill_rate: 10.0, + capacity: 2048, }, } }