Concepts¶
Node, block, cluster¶
Metrics are written by a node that belongs to a cluster. A metric can also belong to a block, for example a model or a job. Aggregators compute values for all three scopes.
Metric¶
A metric has a name, a value, a time, a kind (gauge or counter), an optional block, a unit and labels.
Packet¶
Metrics are collected into batches of up to 1000. A batch is serialized, hashed with SHA-256 and signed. The packet contains body, hash, public key and signature.
L1 and L2¶
L1 are the relays on which aggregators are announced. L2 are the aggregators that receive metrics. An L2 serves one cluster, or is global.
| Event kind | Content |
|---|---|
| 6001 | Registration of an aggregator: addresses, type, cluster, metadata |
| 6002 | Heartbeat with status |
| 6003 | Creation or deletion by a cluster controller |
Signing agent¶
The signing agent holds the key, or uses a wallet. It signs packets, pings and events, and verifies answers. The SDK and the aggregators never see private keys.
Window¶
Values are aggregated in windows of 10 seconds by default. For each series and window, count, sum, minimum, maximum and last value are stored.
Outcomes¶
| Outcome | Meaning |
|---|---|
ok |
Counted |
duplicate |
Already counted |
unauthorized |
The key is not registered for this node |
bad_signature |
Hash or signature is wrong |
invalid, malformed |
Content is not acceptable |
stale |
Too old |
wrong_cluster |
The aggregator does not serve this cluster |
series_limit |
Too many series |