diff --git a/convex/lib/httpRateLimit.test.ts b/convex/lib/httpRateLimit.test.ts index 3183bcc7..7501efff 100644 --- a/convex/lib/httpRateLimit.test.ts +++ b/convex/lib/httpRateLimit.test.ts @@ -278,7 +278,7 @@ describe("applyRateLimit headers", () => { }); }); - it("configures component-backed HTTP limits with 16 shards", async () => { + it("configures high-volume component-backed HTTP limits with 32 shards", async () => { vi.spyOn(Date, "now").mockReturnValue(2_600_000); const ctx = makeRateLimitCtx({ ip: { @@ -305,7 +305,7 @@ describe("applyRateLimit headers", () => { rate: RATE_LIMITS.download.ip, period: 60_000, start: 0, - shards: 16, + shards: 32, }), }); }); diff --git a/convex/lib/httpRateLimit.ts b/convex/lib/httpRateLimit.ts index 4553f5e9..73c021d9 100644 --- a/convex/lib/httpRateLimit.ts +++ b/convex/lib/httpRateLimit.ts @@ -14,7 +14,7 @@ export const RATE_LIMITS = { } as const; const RATE_LIMIT_WINDOW_MS = 60_000; -const HTTP_RATE_LIMIT_SHARDS = 16; +const HTTP_RATE_LIMIT_SHARDS = 32; const HTTP_RATE_LIMIT_MIN_SHARD_CAPACITY = 10; const HTTP_RATE_LIMIT_KEY_TTL_MS = 24 * 60 * 60 * 1000;