With an understanding of what a Micro Service is, it’s time to look at the Node.
-Essentially, the Node is where everything get processed. Every Service has a property called “Node”, which tells you where the Service is going to be executed, which could be any or all Nodes, regardless of location or platform.
These Services can all run on the same or on different Nodes. In the sample above, all Services are run on the same Node.
To send a Message from one Node to the other as in the sample above, you’d need to enable the “Allow send” on properties window of the first Node.
You access the Nodes properties through the Action button on each Node on the Nodes page, and there are many properties that might be important:
|Tags||Tags can be used as groups of Nodes and can be used in Flows to address which Nodes the Flow should run at.|
|Mode||There are three Modes; Normal, Maintenance and Test. Setting a Node in Maintenance Mode will prevent it from reporting errors. The Test Mode is required for running Site Verification Tests.|
|Bind to||The Bind to property is used to simplify the transition from Stage to Production Flows|
|Port||If your Node is hosting REST services, this will be the port used. Make sure the port is not already used on the device.|
|Protocol||Different IoT Hub vendors support different protocols, with different capabilities. Make sure the chose the appropriate protocol.|
|Lock to machine||If enabled, this Node will never be able to be started from a different device.|
|Retention period||The number of seconds to store history data on the node. The persisted history can later be played back and sent from the node. Messages and events are only persisted provided there is more than 25% free disk space in the home directory.|
Disconnect policies are very important, and dictates when a device is considered off-line and what action to take.
|Heartbeat timeout||Heartbeat timeout refers to the elapsed time between each heartbeat.|
|Heartbeat limit||Number of missed heartbeats before concluding the Node is in Disconnected state and taking Disconnected action (see below)..|
|Disconnected action||Disconnected action refers to what you’d like to do if the Node becomes offline. Restart means the process will restart, and Reboot will restart the whole device.|
|Reconnected action||When the Node recover from losing internet connection without entering Disconnected state (reconnected within the heartbeat interval), you can choose Update to force the node to download latest configuration (Flows, Services and configuration) or just continue as normal.|
|Offline mode||Enabling this option allows to Node to start in offline mode, using any pre-fetched configuration.|
|Transmit log files on startup||Enabling this option will cause the Node to transmit all log files after reboot. Log files are available in Logs tab..|
Get Node environment information
Clicking the ENVIRONMENT button will present you with valuable information such as Networks, CPU, Memory and environment variables.
Get and manage Node State
Most IoT platforms respects the notion of State. Microsoft calls it Device Twin, whereas Amazon calls it Things Shadow. In both cases it is a JSON document that represents the State of the Node.
Click the DEVICE STATE button to review and change the State.
See the Reviewing the Audit log section.
Retrieve system logs
By clicking the RETRIEVE SYSLOG button a call is sent to the Node to compress and submit syslogs to the portal. These logs can be downloaded from the Logs tab.