Rooms

Activate intentional group membership without an extra discovery avenue

Rooms connect peers that intentionally share a session identifier. Joining a room activates one avenue; it does not create or retain a separate space or user-scope connection.

Ephemeral room

const room = await rtc.rooms.join('support-7f3a', {
  access: 'capability',
  membership: 'ephemeral',
});

// room.peers, room.channels, room.diagnostics
await room.leave();

This is the default for games, calls, temporary collaboration, and public prototypes.

Authenticated room

const room = await rtc.rooms.join('team-roadmap', {
  access: 'authenticated',
  membership: 'ephemeral',
  auth,
});

Use the authenticated path when the room policy depends on your product user. OpenRTC consumes a registered assertion; it does not own your product authorization model.

Durable membership

const room = await rtc.rooms.join('team-roadmap', {
  access: 'authenticated',
  membership: 'durable',
  auth,
});

Durable membership is a portal-enabled advanced capability. It incurs durable control-plane operations and should be reserved for teams or memberships that must survive everyone leaving.

Capacity is always server-admitted. A client maxPeers can lower its desired capacity but cannot increase the manifest, budget, fan-out, or technical ceiling.

Rooms that grow

Leave the architecture on auto when a room may grow beyond a small group:

const room = await rtc.rooms.join('community-stage', {
  access: 'authenticated',
  auth,
  architecture: 'auto',
  payload: 'reliable',
});

const chat = room.channel<{ text: string }>('chat');
await chat.send({ text: 'Hello everyone' });

OpenRTC keeps automatic reliable groups of eight or fewer as a direct full mesh. Fixed reliable mesh is reviewed through 16 members. Reliable automatic rooms above eight require managed fan-out activation for the app and service; otherwise they fail with room-architecture-unavailable. A local test or a subscription allowance does not enable that rollout. Rooms declaring payload: 'latest-state' may use a sparse graph through 50 members.

You can select a supported fixed architecture instead of auto. Your app owns what it sends, who should receive it, and when. OpenRTC owns authenticated connections, topology execution, recovery, and transport selection.

Delivery primitives

PrimitiveBehavior and current limits
room.channel(name).send(value)Room-wide delivery through the selected architecture. Sparse delivery is for ephemeral/latest-state messages, with application-owned revisions.
room.channel(name).sendTo(peerId, value)Uses an existing direct authorized route. Sparse rooms do not forward targeted messages; managed rooms reject targeted sends.
room.state(name).set(value)Publishes replaceable state; direct sends coalesce pending values. Unavailable in sparse rooms. Managed availability follows its rollout gate.
Room payloadDeclares room-wide delivery semantics. Defaults to reliable; automatic architecture selection does not weaken that contract.
Room architectureDefaults to auto; explicit modes remain subject to capacity, safety, and rollout limits.

Channel names organize application messages; they are not network-level subscription filters or access-control boundaries. Spatial relevance, update frequency, media selection, and asset storage remain application choices.

The direct gateway roster has a 100-member storage/wire safety bound under unified terms. This does not enable a 100-member room: the signed manifest, grant, architecture and rollout impose their own lower limits, including the reviewed 50-member sparse path. Account client capacity is shared across avenues and does not enlarge a room's supported topology. Choosing a fixed architecture does not enable a larger logical room.

During a membership change, OpenRTC may briefly keep displaced active routes as overlap. The shared Rust owner removes them only after the new active routes are connected and admitted. Steady topologies use active routes only.

Sparse forwarding is for room-wide, short-lived updates. sendTo() uses a direct authorized connection and never forwards a private targeted payload through other members. The current API fails closed when that direct route is not already available; automatic direct-route requests are not shipped yet. Durable business actions still need the app's normal idempotency, acknowledgement, and storage rules.

Under unified terms, an active SDK root counts once across its room, space, user and ticket avenues. A room roster entry or physical peer connection is not an extra hosted client. Hosted signaling uses coordination message units; direct room application payloads do not. Existing accepted terms keep finite included control work for room creation, membership changes and cleanup. The coordination-attempt offer counts eligible setup and accepted joins or renewals within the same coordination-message allowance; see Pricing. Historical capacity subscriptions keep their accepted terms.

Additional billable client or hosted-unit usage requires explicit overage consent and a finite spending cap. Manage these settings in the Developer Portal. Managed TURN and MoQ relay delivery are unavailable under these terms; a coordination allowance does not authorize managed relay traffic.

See Adaptive large rooms for automatic selection, diagnostics, capacity, fixed-mode limits, native Rust, and hosted rollout gates.