From 6fa0f2230eeb64760f6d1a05f039fa575a781e04 Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Sun, 8 Dec 2024 11:56:48 -0500 Subject: [PATCH] increase rate limit for `/api/endpoint` based on real-world testing --- packages/backend/src/server/api/endpoints/endpoint.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/endpoint.ts b/packages/backend/src/server/api/endpoints/endpoint.ts index 7629cd7a67..a1dbb26431 100644 --- a/packages/backend/src/server/api/endpoints/endpoint.ts +++ b/packages/backend/src/server/api/endpoints/endpoint.ts @@ -29,10 +29,13 @@ export const meta = { }, }, - // 5 calls per second + // 1000 max @ 1/10ms drip = 10/sec average. + // Large bucket is ok because this is a fairly lightweight endpoint. limit: { - duration: 1000, - max: 5, + type: 'bucket', + + size: 1000, + dripRate: 10, }, } as const;