Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add API changes

...

  • 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

  1. Connect to one or more endpoints from ClientConfiguration
  2. if (!config.DiscoveryEnabled) return;
  3. Perform OP_CLUSTER_GROUP_GET_NODE_ENDPOINTS(-1, -1) to retrieve current topology.
  4. Connect to every server from (2) that is not yet connected.
    1. Use node UUID to make sure we don't connect to the same node twice
    2. 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. 
  5. 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).
  6. Connect to newly discovered servers, remove connections to removed servers
  7. GOTO (4)

...