Explain /1.0/operations/{id}/websocket endpoint

Connects to an associated websocket stream for the operation.
This should almost never be done directly by a client, instead it’s
meant for server to server communication with the client only relaying the
connection information to the servers.

What is “associated websocket stream”?

Why it is not meant for a client? Can you give me an example how should it work, please?

That description sounds like it’s meant for the migration API which works through those endpoints.

When you ask to have an instance migration from one server to another, the source server is asked to prepare the migration stream endpoints (a bunch of /websocket?secret=XYZ endpoints) which then get provided to the target server. The target server directly connects to the source server to then proceed with the migration.

The client only handles creating the migration operations on the source and target and relaying the secrets but should normally never connect to the endpoint itself as it has no way to understand what’s going over those endpoints (that uses a separate protobuf based migration protocol that only the servers implement).

1 Like