# Nodes and locations

> Platform nodes and private nodes, what each may reach, how node health is judged, where node locations come from, and how results survive a lost connection.

A **node** is an installed runner that executes checks. Each node a check runs on is one **location**, shown by its country code.

## Platform nodes and private nodes

|                    | Platform node   | Private node                                           |
| ------------------ | --------------- | ------------------------------------------------------ |
| Who runs it        | Monitorly Cloud | You, on your own Linux server                          |
| Who can use it     | Every workspace | Only its workspace, all of its projects                |
| Internal addresses | Never           | Allowed: that is why you install one                   |
| Added by           | Monitorly Cloud | A workspace owner or admin, with a one-time join token |

The nodes available to a workspace are listed under **Settings → Nodes**, and by `monitorly node list`.

### What platform nodes may not reach

Platform nodes never connect to loopback, private networks (RFC 1918), link-local addresses (including `169.254.169.254`), `100.64.0.0/10`, `fc00::/7`, multicast and `0.0.0.0/8`. The address is checked after DNS resolution and again on every redirect, and the node connects to exactly the address it checked, so a name that changes to an internal address between two lookups cannot slip through. An IPv6 address that carries an IPv4 address is judged as that IPv4 address.

A run refused this way is not a failure of the target: it ends without an outcome, with the code `egress.private_address`, and the check shows the reason. To check such an address, [install a private node](https://docs.monitorly.cloud/nodes/install.md) in that network.

## Node health

Each node reports a heartbeat. Its state, shown on every location of a check:

- **online**: heartbeats arrive and nothing is wrong;
- **degraded**: its own reference targets fail, it fails many targets that other nodes see as alive, or its clock is more than 5 seconds off (the node card says by how much, for example "clock is 2 min 13 s behind, check NTP");
- **offline**: no heartbeat for more than 45 seconds.

Results from degraded and offline nodes are kept but do not count toward a check's status. When a node stays offline for more than 5 minutes, the workspace's admins (private node) get a system notification.

## Location

A node's country and city are looked up from the address it connects from. When that finds nothing, a workspace owner or admin sets the location by hand on the node list; a location set by hand is never changed by the lookup again.

## Results survive a lost connection

A node keeps results it has not delivered in an on-disk queue and sends them when the connection is back. The queue holds at most 1 GiB or 7 days of results, whichever comes first. On overflow the oldest results are dropped and the node reports the dropped interval as "no data": it shows in grey in the location's history and is left out of uptime.

## Rate per destination

A node starts at most 5 runs per second against one destination address, with bursts of twice that, so many checks of one host never flood it. A scheduled run over the limit waits for its turn no longer than the check's interval; after that it ends without an outcome with `runner.rate_limited`.

## Revoking a node

A workspace owner or admin can revoke a private node. Its session closes at once and checks no longer run on it. A revoked node never comes back: install a new one with a new join token.
