MP clients were self-identifying their endpoints, by serializing
them to the MP server. This works fine if both client and server
are on the same network, but if clients or servers are on their
own private network (clients connecting to a k8s system is a good
example), then those private client endpoints are not unique.
i.e. 2 clients from different private networks may have identical
endpoints and will cause MP clashing and random disconnections.
To avoid this, use the peer endpoint of the connected socket.
This means that the MP client connections are now identified
and mapped by the peer endpoint of the connected socket.
This also necessitates a few other required changes:
1) Each MP packet also has an endpoint in it, which are encoded
in their header. On receipt (via socket notification), change
their header to match the peer endpoint.
2) Subscriptions also self-identified, and relied on matching
the incoming packets for notification.
Change to ignore the self-identification endpoint, and use
the peer endpoint encoded in the message header (sender).
3) The Thor worker nodes rely on being able to identify
themselves in the thor process group (formed at registration
time), they were relying on the peer sender, which due to
the above changes could now be different.
Change to serialize the slaves endpoint to master at
registration time and use to build process group.
- relates to
HPCC-28316 Revert MP changes from HPCC-28125