fix(federation): raise relay rate limit from 30 to 90 req/min per peer

The outbox worker interval was reduced from 10s to 1s in FED-009,
so a busy sender can now hit 60 req/min during sustained traffic.
90 gives 50% headroom.
This commit is contained in:
Jannis Braun
2026-04-01 02:00:19 +02:00
parent 4a39b503db
commit 42cf8afddd
+1 -1
View File
@@ -108,7 +108,7 @@ function isAcceptRateLimited(ip: string): boolean {
// ─── In-memory rate limiter for the relay endpoint (per-peer) ──────────────── // ─── In-memory rate limiter for the relay endpoint (per-peer) ────────────────
const relayRateBuckets = new Map<string, number[]>(); const relayRateBuckets = new Map<string, number[]>();
const RELAY_RATE_WINDOW_MS = 60_000; const RELAY_RATE_WINDOW_MS = 60_000;
const RELAY_RATE_MAX = 30; const RELAY_RATE_MAX = 90;
function isRelayRateLimited(peerOrigin: string): boolean { function isRelayRateLimited(peerOrigin: string): boolean {
const now = Date.now(); const now = Date.now();