Skip to main content

Limits

Beta

This feature is in beta. Core behavior is stable, but some APIs or configuration may change before general availability.

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
Max dot-path depth5 levelsNoe.g. a.b.c.d.e for nested state operations (enforced in tests; not yet validated at runtime)

Timing

LimitDefaultConfigurableNotes
Auth timeout5,000 msNoConnection closed if no auth message
Action handler timeout5,000 msNoPer handlers.actions execution
Reconnect grace period30,000 ms (30s)Yesrooms.*.reconnectTimeout (0 = immediate onLeave)
Delta batch window50 msNoState changes are buffered before broadcast
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 TTL60 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
handlers.actions5s 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.