...
- Server can use Compute to retrieve endpoints for every cluster node; alternatively, we can put this information into node attributes. To be discussed.
- Server must return endpoints according to IgniteConfiguration.Localhost setting (IgniteConfiguration.Localhost defines network interfaces for Ignite to bind to).
Client Public API Changes
bool ClientConfiguration.DiscoveryEnabled
: false by default
Client Logic
- Connect to one or more endpoints from ClientConfiguration
if (!config.DiscoveryEnabled) return;
- Perform OP_CLUSTER_GROUP_GET_NODE_ENDPOINTS(-1, -1) to retrieve current topology.
- Connect to every server from (2) that is not yet connected.
- Use node UUID to make sure we don't connect to the same node twice
- Verify that node UUID from handshake is equal to node UUID from OP_CLUSTER_GROUP_GET_NODE_ENDPOINTS response: when client and server are in different subnets, there can be a mismatch. The node can even belong to a different cluster. Drop the connection in case of a mismatch.
- For every response to any operation, compare topology version from the header to the topology version from (2). When it changes, request updated topology with OP_CLUSTER_GROUP_GET_NODE_ENDPOINTS(oldVer, newVer).
- Connect to newly discovered servers, remove connections to removed servers
- GOTO (4)
...
{"serverDuration": 199, "requestCorrelationId": "44ec8b0a5d63a013"}