wss://10.11.30.40:44445/api/v1/socket instead.
Both SDKs wrap this, so if you are writing TypeScript or Python you can stop reading:
The handshake
The first message must be the credential, and nothing flows before it:public. A connection from the machine itself, with the empty string, is told private, and so is a machine of the farm using its own credential.
A connection that has not authenticated within five seconds is closed with 4401. That is not a grace period to lean on: an unauthenticated socket must not be a way to hold a slot open on a render farm.
Subscribe
Filters
A value may name several ids, comma separated, and that is one subscription rather than several:
The frames
An update is a patch and not the row, for most entities, and that is a deliberate saving rather than an omission. A task update measured 553 bytes with the document attached and a rendering farm writes hundreds a second, so the document is sent only where a client genuinely replaces the row whole.
The entities
Every one of these butcommands mirrors a public REST route, so an API key sees on the socket exactly what it can read over HTTP.
Resync
There is no replay. When events are missed, the farm says so and the answer is to read the collection again:- A
resyncframe naming collections. - A gap in
seq. You got 41 and then 43. - A reconnect. Whatever happened while you were away is gone.
resync frame and a clean slate. Admitting the gap costs a flag. Holding memory for one stalled client on behalf of a farm that keeps working costs the farm.
Staying alive
Every thirty seconds the farm sends a protocol ping and a frame you can see from script:Closing
Refusing to retry a 4401 matters more than it sounds: a reconnect loop on a bad key is a loop that never ends and never says why, and on a farm with three thousand machines it is a loop that also floods a log.