| Players per room |
16 |
| Rooms on the server / per namespace |
500 / 50 |
| Sockets on the server / unverified / per address |
2000 / 200 / 20 |
| New sockets |
200 a second (over it: 1013 busy) |
| Joins per address |
30 a minute |
| Message / player state / shared state |
16 KB / 2 KB / 64 KB (the client splits bigger host updates) |
| Shape |
plain JSON, depth 4, 64 keys per object, 64 items per list, text 200 characters, keys 40 characters (SHAPE); a write that breaks one is refused whole |
| Messages per socket |
50 a second, burst 100 (a state write over it is dropped and the sender gets error too_fast, at most once a second; room.js then resyncs from the server’s copy; room.js itself sends at most 20 effects a second, the rest wait for the next send slot); actions 5 a second, burst 10; clock pings 2 a second, burst 4 (2 before sign-in) |
| Data out |
a room over 250 KB/s (moving average, roomOutBytes) sends half as often (down to an eighth), and goes back to the faster rate once that rate would be under 80% of the budget; its host gets error too_much_data once (game.js prints a hint). The whole server over 80% of maxOutMbit (100), or an event loop over 30 ms p99 for 10 s (hub.loopRecent), sends rooms over 4 players at half rate and answers new rooms (not joins to open ones) 1013 busy, until under 60%. Sizing: GB an hour = Mbit/s x 0.45 |
| Fan-out |
each room on its own phase of a 10 ms sub-tick (rooms do not all write their sockets at once); changes every 50 ms; every 100 ms in rooms over 8 players (effects every 50 ms); effects queued past 128 or 16 KB go out at once |
| Seat held after a drop |
30 s; 5 min when the page was put away first (a phone switched apps, e.g. to send the invite). Host duty moves at once. A full room gives the seat of someone gone at least 10 s (evictAfterMs; a page put away first, then the longest gone) to a newcomer. |
| Silent host |
5 s, then host duty moves |
| Silent page |
a visible page that sends nothing for 15 s (silentMs; the relay pings every 5 s) is dropped with 4009, its seat held as for any drop; hidden pages only need the socket ping |
| Saved profile / written |
16 KB per person and game / at most every 3 s, and when the person leaves or a match ends |
| Saved world / written / kept |
one per namespace and game, written by one room at a time, 64 KB / every 5 s while it changes, and when a match ends or the room empties / 90 days |
| Slow reader |
16 KB queued (rateBytes): half the frames, then a quarter, merged so nothing is lost; back one step after 10 s near empty (rateUpMs). 64 KB: changes skipped, one full copy later; 256 KB: dropped |
| Idle room |
closed after 15 min with no person doing anything, warned 1 min before; left out of lists after 5 min |
| Room list |
1 request a second per socket, burst 2 (listRate); built at most every 250 ms per game; 50 rooms |