Segments
Create and configure a segment, its environment, transports, who may connect, limits, rate presets and monthly caps.
A segment is one app in one environment, with its own keys, topic rules and topics. Create it from Segments → New segment, as in Get started. This page covers its Settings tab; owners and admins can change them.
General
| Setting | Meaning |
|---|---|
| Name, description | For your team |
| Environment | Production, Staging or Development. Clients see it when they connect; it changes no limits |
| Active | Off refuses every client of the segment with Suspended, and closes open connections |
Transports
| Transport | Turn off when |
|---|---|
| WebSocket (apps and browsers) | The segment only takes server-side publishes |
| HTTP publish and long-poll (backends) | You want every client on WebSockets |
The JavaScript SDK falls back from WebSocket to long-polling where WebSockets are blocked, so leave HTTP on for browser apps. See Transports.
Who can connect
| Setting | Default | Meaning |
|---|---|---|
| Allow anonymous connections | Off | Accept anonymous tokens, which publishable keys issue |
| Anonymous connections at once | Empty | A cap on anonymous connections. Empty: only the segment's connection limit applies |
| Connections per user | Empty | How many connections one identity may hold, one per device or tab. Empty: no limit |
| When a user is at the limit | Close the oldest | Close the oldest closes their oldest connection with Replaced, so a device that dropped off never locks its user out. Refuse the new one answers QuotaExceeded |
Limits
A segment can set its own limits, lower than the package's but never higher. Leave a limit empty to use the package's.
| Limit | Meaning |
|---|---|
| Connections | Connections the segment holds at once; a hard cap |
| Payload size | Largest event payload, at most 60 KiB on every package |
| Topics | Topics the segment holds at once |
| Publish rate | Publishes per second per connection |
Rate preset
The preset says what the segment is for, and shapes its rate limits to match. Segment-wide limits scale with the connections the package allows.
| Preset | Shaped for |
|---|---|
| General | Most apps; the default |
| AI streaming | A high publish rate into few topics |
| Chat | Many topics, each with a low rate |
| Live dashboard | Many subscribers per topic and high outbound traffic |
| IoT | A low rate per connection over very many connections |
You can lower any of the preset's limits (publishes per second per connection, per topic and per segment, bytes per
second in and out, subscribers per topic, subscribes, topic creations and new connections per minute). Clients
learn the limits in force when they connect. The presets' values are published at
GET /api/v1/rate-profiles.
Monthly caps
Cap a segment's share of the workspace's monthly messages and data transfer, so one app can't use up the allowance for the others.
| At the cap | Then |
|---|---|
| Stop (default) | The segment's new publishes are refused until the next period |
| Continue | You're notified; nothing is refused |
| Continue with extra | It carries on for an extra percentage of the cap, then stops |
Caps limit; they don't reserve. Several segments' caps can add up to more than the allowance, and the workspace's own limit still applies.
Deleting a segment
Deleting a segment removes it with its keys and topic rules, and its clients can no longer connect. It can't be undone.