Overview

All nodes (servers and clients) are able to host services, but the client nodes are excluded from service deployment by default. The only way to deploy service on client nodes is to specify node filter in ServiceConfiguration.

All deployed services are identified internally by “serviceId” (IgniteUuid). This allows us to build a base for such features as hot redeployment and service versioning. It’s important to have an ability to identify and manage services with the same name, but a different version.

Deployment process

Services deployment process - is a process of change deployed services state.

Unified steps of service deployments process:

Triggers:

Example of user’s service deployment request according to unified flow:

  1. Initiator sends ServiceChangeBatchRequest request using discovery spi to change service state [deploy, undeploy]. The request will be stored by all nodes in own queue to be processed, event if the coordinator failed;
  2. All nodes process tasks from queue, when deployment request received each node calculates a new service’s assignments independently using deterministic assignments function and apply actions (deploy, undeploy) if needed, then node builds single deployments message ServiceSingleNodeDeploymentResult that contains services id and amount of instances were deployed on this single node and sends the message to coordinator (p2p);
  3. Once the coordinator receives all single deployments messages then it builds ServiceClusterDeploymentResult that contains services deployments across the cluster and sends the message through disco-spi to be processed by all nodes;

Coordinator change

All nodes handle requests of service’s state changes and put them into deployment queue, but only the coordinator aggregates single deployments messages received from nodes and builds a full deployments to finish exchange. If coordinator left or fail during deployment exchange another server node will become the coordinator and continue the process.

Topology change

Each topology change event (NODE_JOIN/LEFT/FAILED) causes  deployment task. Assignments will be recalculated and applied for each deployed service if needed.

Services reassignment process takes into account previous assignments to avoid redundant redeployments.

If left/failed node had not deployed any services, then deployment task will be finished without sending messages.

Cluster activation/deactivation

Deployment errors propagation

All error occurred during service deployment exchange are propagated across the cluster and are available on any node. Current implementation covers the following errors’ causes: