diff options
Diffstat (limited to 'docs/dashboard.md')
| -rw-r--r-- | docs/dashboard.md | 99 |
1 files changed, 82 insertions, 17 deletions
diff --git a/docs/dashboard.md b/docs/dashboard.md index b7e3069..25bcfe8 100644 --- a/docs/dashboard.md +++ b/docs/dashboard.md @@ -14,10 +14,10 @@ cargo build --release --features mycelium,dashboard ``` It is at `/admin/dashboard` on the node's HTTP API, by default -`http://127.0.0.1:3000/admin/dashboard`, and asks for a user from `--htpasswd`, as the -rest of the API does. The API listens on localhost unless `--bind-addr` says otherwise; +`http://127.0.0.1:3000/admin/dashboard`, and asks for a user from `--htpasswd` (or one +a reverse proxy names, `--user-header`), as the rest of the API does. The API listens on localhost unless `--bind-addr` says otherwise; to look at a node on another machine, forward the port (`ssh -L 3000:localhost:3000 -<machine>`) or put a TLS proxy in front ([`trust.md`](trust.md)). +<machine>`) or put a TLS proxy in front ([`operations.md`](operations.md), Behind a reverse proxy). Every node has its own dashboard, and shows the swarm as that node sees it: what it knows of the others, what they report to it, and its own figures. @@ -100,16 +100,19 @@ else the fresher. Then: * **Narrow, over a red band**: either end holds the other dormant, or the path in use is down (no path to the peer answers; `/peers` shows its connection as `null`). -Messages this node exchanges run along its links as dots, from sender to receiver. +Messages this node exchanges run along its links as dots, from sender to receiver, all +at one speed: over a longer link they arrive later. They come from the per-peer message counts, which arrive every 2 s: what was sent and received since is spread over the next 2 s, at most 6 dots per link and direction, shared out by message kind, each kind in its colour (named in the legend; the console colours them alike). A dot is as large as its kind's messages were on average -(by the size's logarithm: a ping small, a large sync message large); the slider right -after their legend makes all dots larger or smaller, kept in the browser. A picture +(by the size's logarithm: a ping small, a large sync message large); the `size` slider +right after their legend makes all dots larger or smaller, and the `speed` slider after +it makes them run faster or slower (0.1 to 0.9 map units per millisecond, 0.3 at +first: a link of 200 in about 0.7 s); both are kept in the browser. A picture of the traffic, not a record of it; links between other members show none. -`messages: on` after the slider hides them (`messages: off` shows them again; the -legend and the slider greyed meanwhile); the choice is kept in the browser. +`messages: on` after the sliders hides them (`messages: off` shows them again; the +legend and the sliders greyed meanwhile); the choice is kept in the browser. A label on the map that changes, a round trip or a node's name, breathes once: it glows around its new text and fades (not where the system asks for reduced motion). @@ -120,8 +123,10 @@ every 30 s, which costs the swarm fewer messages and leaves the map up to 30 s b (this node's own links stay current). It's the node's choice, for every page open on it, until clicked again or the node restarts. -The legend above the map names the transports that appear; `hide legend` beside the -box's title gives its room to the map (`show legend` brings it back). +The legend, over the top of the map, names the transports that appear; its contents +are on an underlay of their own shape, as the map's labels, so they read over what is +under them, and the map is dragged through it as anywhere else. `hide legend` beside +the box's title hides it (`show legend` brings it back); the map stays as it is. `layout: static`, beside it, is the default: nodes move only when the map is laid out (below). A click switches to `layout: dynamic`: each measured link is as @@ -146,10 +151,23 @@ measured. * **Drag a node**: move it. On a dynamic map, the others follow at once, and once let go of, it moves back among them; on a static map it stays where it is put until the map is laid out again. -* **Double-click a node**: pin it where it is (a dot in its middle): the layout leaves - it there. A double-click whose second press drags the node pins it where it's - dropped. Double-clicked again, it's let go, and moves to its place among the others - (on a static map, only it moves). +* **Double-click a node**: open its dashboard, in this page, where the node publishes + one (`--dashboard-url`, in the member list; e.g. behind a reverse proxy, + [`operations.md`](operations.md)). The other dashboard asks for its own credentials + where its proxy or node does. It opens as this one was left: the map's nodes where + they were (on a dynamic map they then move to their places among the other node's + links, smoothly; new ones are placed among them), the view, the pins, what is in + focus, the legend shown or hidden, what is open in the figures and in the document, + `links: live` or `every 30 s` (the other node's choice, for every page open on it), + and this browser's settings for the page (sizes, collapsed boxes, the layout, the + messages' size and speed, the console's filter), which are per host otherwise. + They travel in the URL's fragment, which no request carries, and the page removes it + at once. Links are drawn as the other node sees them. Where it publishes none, its + halo flashes red and "no dashboard" rises from it, fading out. +* **Middle-click a node**: pin it where it is (a dot in its middle): the layout leaves + it there. Dragged with the middle button, it is pinned where it's dropped. + Middle-clicked again, it's let go, and moves to its place among the others (on a + static map, only it moves). The map is laid out when the page opens, and again when the window or the box is resized. A member that comes later is placed among the others, which stay where they @@ -224,7 +242,8 @@ The messages this node exchanged with its peers, one by one: when (on the 24-hou clock, to the millisecond), which way (`→` sent, `←` received, `↛` refused: the transport wouldn't send it), with whom, the type (`HELLO`, `SYNC`, `STATUS_REPLY`, `LINKS`, …, in its kind's colour, as on the map) and the size. The latest 500, the -newest at the bottom; scrolled along while at the bottom. They arrive with every update +newest at the bottom; scrolled along while at the bottom, which `following…` beside the +title says. `clear` empties it; what comes from then on fills it again. They arrive with every update (every 2 s). The PINGs the paths layer sends on its own, and the PONGs it answers PINGs with, are listed too: under the node at the address they went to, where it is known, else under the address. Not listed: WHO and ME, which stay in the layers @@ -242,6 +261,29 @@ requests and answers, from whichever peers (by the blob), and a delta offered in with the blob it is fetched as. A STATUS and its reply carry nothing that ties them, nor does an ordinary SYNC. +The map marks the message's two nodes and the link between them in the grey its line +has in the console, each in its own shape: a circle around each node, and the link's +lines as they bow. The message shown and the one pointed at are both marked, each in +its line's grey; where they mark the same node or link, the shown one's wins. + +The other way round, the messages exchanged with a node, or over one of this node's +links, are tinted in the colour of its halo on the map: lightly while it is pointed at +there, stronger while it is in focus (clicked there or in the peers); where both tint a +message, in focus wins. + +`filter selected`, beside the console's title, shows only the messages with the node or +over the link in focus (clicked on the map or in the peers; pointing at one doesn't +count), and all of them while nothing is. Where there are none to show (a link between +two other nodes, a node this one exchanges nothing with), it says so. Whenever what it +shows changes (turned on or off, another focus, or none), the console goes to the newest +message and follows from there. The choice is kept in the browser. + +At the right of the console's title, `msg/s` gives the messages per second sent and received, as load averages +do: over the last 1, 5 and 15 minutes (exponentially weighted), since the page was +opened, from the message counts each update brings; below it, the bytes per second +alike, in `B/s`, `KiB/s` or `MiB/s`, whichever the largest of the three needs. With the filter on, they are those +with the node or over the link in focus; `–` where there are none. + ## While you read Updates don't pull things from under you: while text is selected in a box, that box @@ -254,7 +296,9 @@ are done. The map isn't redrawn under the pointer: what you point at stays put. built with `dashboard` (404), or the user isn't in `--htpasswd` (401). * **A hollow node**: no links report from it. If it is also dormant here, it is probably down or unreachable; if not, it may not take this node for a member yet - (it hasn't registered it), or its answers don't arrive. + (it hasn't registered it), or its answers don't arrive. A node that just joined + through others shows as soon as one of them reports a link to it, hollow until its + registration reaches this node and it is asked for its links (within 30 s). * **Only dashed grey between two nodes**: the member list wants them as neighbours, but neither reports a link to the other: they haven't reached each other (yet). * **A dotted link**: one end has stopped reporting; the link is as it was last @@ -290,6 +334,25 @@ older than 90 s is left out. A member keeps 64 subscribers at most. With `links: and the members are only asked every 30 s, for every page open on this node, until asked otherwise or the node restarts. +A member this node can't reach (on none of its transports: one on Tor alone, from a +node on libp2p alone) is asked through a peer that can: an active member it reaches +that, by the member list, shares a transport with the member, else one on a transport +this node isn't on (the lowest pair score of several). The LINKS names the members to +ask (`of`): the peer asks them on this node's behalf, itself or again through a peer +of its own (three nodes at most), for as long as this node asked, and passes their +links on in its replies (`relayed`, each with its age), several together (64 members' +at most, and 256 KiB as encoded but for one member's alone): it holds what arrives a +while. The asker's window (250 ms, at most 5 s) is for the whole way: +each hop holds its share of what is left, the window divided among it and the hops +that may follow (at least 10 ms), and passes the rest on, so links reach the asker +within the window however long the chain. Such a subscription isn't ended by a message: every hop's runs +out unless renewed, so it ends within 90 s of the page closing or the node going away. +A hop renews its own as soon as it is renewed, for the same time, so the hops run in +step, each a message's delay behind the one before (it never runs out first), and a +renewal keeps its nonce, so what is on its way under the last one still counts. A +renewal lost on the way leaves the hops behind it to run out at the old time: with 90 s +renewed every 30 s, one lost costs nothing. + The links a member reports: its neighbours and the peers it holds dormant (a neighbour that goes dormant is one no more, but stays listed until it is heard from again), by which transport, whether only through a relay, the round trip (as the paths layer @@ -297,7 +360,9 @@ measures it), whether it holds the peer dormant or the path is down, the peer's transports with a path up (each with its fastest path's round trip, and whether it goes only through a relay), and the peer's clock against the member's ([`measurements.md`](measurements.md), Per peer, `clock`). A member answers a LINKS from members only, at most every 5 s, and -every build answers, with or without the feature (`swarm::links`). +asks for each peer that has it relay at most 512 members at once and 32 a second on +average (the rest of a request is dropped); every build answers, with or without the +feature (`swarm::links`). **Clocks.** The clocks in the links chain every member's clock to this node's, along the narrowest bounds, and the map takes each against their median: a member more than |
