Skip to content

RFD 003 - Node API

KeyValue
AuthorKevin Stiehl kevin.stiehl@bagaluten.email
StateDraft

Node API description

When a Bale node starts up it connects to the cluster with a uniqe name. This uniqe name can then be used to publish information and evetns about this node to predefined subjects in nats so that other nodes or an admin can observe what is going on or even interact with specific nodes

Subjects of the Node API

Every Bale node gets an own subject prefix which is constructed with the following pattern.

<context.root>.nodes.<uniqe_name>

So if the root subject from context would be configured as bale and the node's uniqe name is single_unicorn_1

bale.nodes.single_unicorn_1

This subject is only the prefix for other subject and is from now on only called <node_path>

SubjectDescription
<node_path>.eventsThe node will publish evetns to this subject (Jobs starting/stopping, Crashing, other interactions with the node)
<node_path>.infoThe Node will publish a descripiton of itself to this endpoint. (Number of cores, number of memory)