Ignite nodes can automatically discover each other. This helps to scale the cluster when needed, without having to restart the whole cluster. Developers can also leverage from Ignite’s hybrid cloud support that allows establishing connection between private cloud and public clouds such as Amazon Web Services, providing them with best of both worlds.
- Pluggable Design via
- Dynamic topology management
- Automatic discovery on LAN, WAN, and AWS
- On-demand and direct deployment
- Support for virtual clusters and node groupings
Cluster functionality is provided via
IgniteCluster interface. You can get an instance of
Ignite as follows:
Ignite ignite = Ignition.ignite(); IgniteCluster cluster = ignite.cluster();
IgniteCluster interface you can:
- Start and stop remote cluster nodes
- Get a list of all cluster members
- Create logical Cluster Groups
ClusterNode interface has very concise API and deals only with the node as a logical network endpoint in the topology: its globally unique ID, the node metrics, its static attributes set by the user and a few other parameters.
All cluster nodes on startup automatically register all environment and system properties as node attributes. However, users can choose to assign their own node attributes through configuration:
<bean class="org.apache.ignite.IgniteConfiguration"> ... <property name="userAttributes"> <map> <entry key="ROLE" value="worker"/> </map> </property> ... </bean>
Following example shows how to get the nodes where "worker" attribute has been set.
ClusterGroup workers = ignite.cluster().forAttribute("ROLE", "worker"); Collection<GridNode> nodes = workers.nodes();
All node attributes are available via
Ignite automatically collects metrics for all cluster nodes. Metrics are collected in the background and are updated with every heartbeat message exchanged between cluster nodes.
Node metrics are available via
ClusterMetrics interface which contains over 50 various metrics (note that the same metrics are available for Cluster Groups as well).
Here is an example of getting some metrics, including average CPU load and used heap, for the local node:
// Local Ignite node. ClusterNode localNode = cluster.localNode(); // Node metrics. ClusterMetrics metrics = localNode.metrics(); // Get some metric values. double cpuLoad = metrics.getCurrentCpuLoad(); long usedHeap = metrics.getHeapMemoryUsed(); int numberOfCores = metrics.getTotalCpus(); int activeJobs = metrics.getCurrentActiveJobs();
Local grid node is an instance of the
ClusterNode representing this Ignite node.
Here is an example of how to get a local node:
ClusterNode localNode = ignite.cluster().localNode();
Updated less than a minute ago