Skip to main content

Limits

Technical limits for EdgeBase Room (server-authoritative multiplayer state channels).

Room Capacity

LimitDefaultConfigurableNotes
Max players per room100Yesrooms.*.maxPlayers (max 32,768)
Max state size1 MBYesrooms.*.maxStateSize (min 1 KB) — shared + all player states combined
State warning threshold80% of maxStateSizeNoROOM_STATE_WARNING event fired
Max dot-path depth5 levelsNoe.g. a.b.c.d.e for nested state operations

Timing

LimitDefaultConfigurableNotes
Auth timeout5,000 msNoConnection closed if no auth message
Action handler timeout5,000 msNoPer onAction execution
Reconnect grace period30,000 ms (30s)Yesrooms.*.reconnectTimeout (0 = immediate onLeave)
Delta batch window50 msNoState changes are buffered before broadcast
Delta throttle10 msg/sNoMaximum delta broadcast rate
Room idle timeout300 secondsNoEmpty room hibernation delay

State Persistence

LimitDefaultConfigurableNotes
State save interval60 secondsYesrooms.*.stateSaveInterval
State TTL24 hoursYesrooms.*.stateTTL — safety net for orphaned storage

Rate Limiting

LimitDefaultConfigurableNotes
Action rate limit10 actions/secYesrooms.*.rateLimit.actions (token bucket, min 1)
Pending connections per IP5NoWebSocket DDoS gate
Pending connection TTL10 secondsNoAuto-expires; no cleanup needed

Messaging

FeatureLimitNotes
sendMessageBroadcast to alloptions.exclude to skip specific users
sendMessageToUnicast to one user
Named timersAlarm multiplexerPersisted to DO Storage; survives hibernation

Lifecycle

HookBehaviorNotes
onJoinCan throw to reject
onLeavereason: 'leave' / 'disconnect' / 'kicked'
onDestroyStored state immediately deleted
onAction5s timeout, try/catch protected
Room config validation

maxPlayers must be between 1 and 32,768. maxStateSize minimum is 1 KB. reconnectTimeout must be non-negative. rateLimit.actions must be at least 1. Invalid values cause a config validation error at deploy time.