Skip to main content
Occupancy provides high level metrics about the clients attached to a channel. This includes the number of connections currently attached to a channel, and the number of connections attached that are permitted to publish and subscribe to the channel.

Occupancy metrics

The following are the metric categories that occupancy reports:

Realtime occupancy updates

Subscribe to occupancy events in realtime using the occupancy channel option:

Query occupancy via REST

You can query occupancy for a single channel using the REST API:

Enumerate channels with occupancy

List all active channels and their occupancy:

Occupancy payload structure

When subscribing to [meta]occupancy events, the message structure is:

Use cases

Display active users

Monitor capacity

Track engagement

Occupancy vs Presence

Use occupancy when you only need counts. Use presence when you need to know who is online.

Next steps