File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
web/src/server/free-session Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -7,14 +7,15 @@ import { env } from '@codebuff/internal/env'
77 */
88export const FREEBUFF_ADMISSION_LOCK_ID = 573924815
99
10- /** Admission tick cadence. Fast enough to drain the queue promptly, slow
11- * enough to avoid DB churn. */
12- export const ADMISSION_TICK_MS = 5_000
10+ /** Admission tick cadence. Paired with MAX_ADMITS_PER_TICK=1 this staggers
11+ * admissions so newly-admitted CLIs don't all POST to the
12+ * Fireworks deployment simultaneously. */
13+ export const ADMISSION_TICK_MS = 15_000
1314
14- /** Max users admitted in a single tick. Protects against thundering-herd
15- * admissions when capacity frees up all at once (e.g. after a Fireworks
16- * incident clears) . */
17- export const MAX_ADMITS_PER_TICK = 20
15+ /** Max users admitted in a single tick. Staggering matters more than
16+ * throughput here: keeps load on Fireworks smooth even when a
17+ * large block of sessions expires at once . */
18+ export const MAX_ADMITS_PER_TICK = 1
1819
1920export function isWaitingRoomEnabled ( ) : boolean {
2021 return env . FREEBUFF_WAITING_ROOM_ENABLED
You can’t perform that action at this time.
0 commit comments