Limits
These limits protect the gateway. A listener that follows the connection lifecycle stays far inside them.
| Limit | Figure | What happens past it |
|---|---|---|
| Active tokens per account | 1 on the free plan, 5 on any paid plan | Creating another returns 409 |
| Tokens created per account per UTC day | 10 | Creation returns 429 |
| Tokens created per network per UTC day | 30 | Creation returns 429 |
| Connections per token | 2 | A third closes with 4010 |
| Open connections per network, including ones that have not identified | 50 | The next one closes with 4014 |
| Open connections across all networks | 1,000 | The next one closes with 4015 |
| New connections per network per minute | 60 | Closes with 4008 |
| Failed IDENTIFY attempts per network per minute | 10 | Closes with 4008 |
| Messages per connection in any rolling 60 seconds | 60 | The 61st closes with 4008 |
| Size of one message from a client | 4,096 bytes | Closes with 4002 |
| Time to send IDENTIFY after connecting | 30 seconds | Closes with 4003 |
| Missed heartbeat intervals | 2 | Closes with 4009 |
| Events you may be behind | 1,000 | Closes with 4011 |
| How long events are kept for resume | 24 hours | RESUME returns INVALID_SESSION |
A network means one IP address. IPv6 addresses are grouped by /64.
Heartbeats and falling behind
A client that follows the lifecycle sends about one message every 45 seconds, so the message limit only stops a flood.
The last_seq in your heartbeats tells the server how far you have got. If it falls more than 1,000 events behind what the server has sent, the connection closes with 4011. You can resume straight away. Send the sequence number of the last event you have processed, not a fixed value, and read events as they arrive.
Capacity
The gateway has an overall limit of 1,000 open connections across all networks. When it is reached, or when the gateway is switched off, new connections close with 4015. Wait, then try again.
Browsers
Browser clients are not supported. A request whose Origin header is not exactly on the gateway's allow list gets HTTP 403 before the connection opens. The allow list is empty at launch. Requests with no Origin header, which is what Node.js, Python and curl send, are not affected.