Skip to content

five-on-it / apps/server/src/capacity

apps/server/src/capacity ​

Whether a game server takes more (the fleet's admission, TECHNICAL_SPECS §11): not while it drains for maintenance, nor past its players (FOI_CAPACITY, 128 by default), nor while its loop is slow with players on it (its steps' 95th percentile past ADMISSION.stepP95Ms, where a new room would make every room late; with nobody playing no room steps, whatever the last seconds' steps took), nor past its rooms when it is given a cap of them (FOI_MAX_ROOMS: none by default; every open room counts then, the default one and the levels' included). What it refuses is a new room (the API's POST /rooms: 503, and the fleet places it elsewhere) or a level's room it would have to open; a player joining a room already open is let in but while draining.

A run's room (TECHNICAL_SPECS §9.5: one mission for its roster) is a whole level's world more, opened before its players come, so the step's guard cannot see what it will cost; runs have a cap of their own (runAdmissionOf: FOI_MAX_RUNS, ADMISSION.maxRuns by default), counting the run rooms open and on their way. Its default is measured (docs/guide/performance.md, Runs): with the city and two Riverbend runs the step's p95 is at the tick.

Type Aliases ​

Variables ​

Functions ​