mirror of
https://github.com/openclaw/clawhub.git
synced 2026-08-14 00:47:57 +00:00
fix: increase HTTP rate limit shard headroom (#3432)
This commit is contained in:
@@ -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,
|
||||
}),
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user