Skip to content

One node per machine ​

Bitstream runs one node on each machine. The panel refuses a second node, or a node next to a panel proxy (bs-edge), on a machine that already has one.

Why ​

  • They fight over the same machine. Two nodes share one CPU, one network card and one disk. Each one thinks it has the whole machine, so both take too many channels.
  • The load balancer counts the machine twice. It sends viewers to "two servers" that are really one. When that machine is busy, both fail at once.
  • Ports collide. Two nodes want the same delivery ports and certificates.
  • A panel proxy hides the panel. A node on the same machine publishes that machine's address to every viewer, which defeats the proxy.

A node on the panel machine is allowed (the "both" install). It is fine for a test lab. For paying customers, see Recommended architecture.

How the panel knows ​

Each node and panel proxy sends a machine id when it enrolls and once a minute after that. The id is a hash of /etc/machine-id (or /var/lib/dbus/machine-id, then the DMI product uuid). The raw value never leaves the machine. Reinstalling Bitstream keeps the id, so a reinstall needs the old node removed first.

Install over SSH checks the id before it uploads anything and stops with a clear message. Nodes and proxies built before this feature send no id and are not checked.

The dashboard Service Status has a check, "One machine per node", that lists machines already shared. The check "Nodes apart from the panel" uses the same id.

Test rigs only: BS_ALLOW_SHARED_HOST ​

End-to-end tests sometimes run two nodes on one machine. Set BS_ALLOW_SHARED_HOST=1 in the control environment to turn the refusal into a warning in the log. Never set it in production. A release that ships to such a rig must say so in its release log.

Reading the processes list ​

Nodes → Processes shows every process of every machine, refreshed every 10 seconds. Each machine measures itself when you open the page (CPU over half a second, kept 2 seconds). Nothing runs in the background.

  • A node on the panel machine is one entry, "Panel and {node}", with both badges. Its processes appear once.
  • Bitstream's own processes (bs-control, bs-node, bs-edge, and the ffmpeg the node starts) have a badge. An ffmpeg row links to its channel.
  • CPU 100% is one full core. RAM is resident memory and its share of the machine.
  • Disk shows read and write per second. It shows "-" for processes of other users: the node does not run as root, and Linux only lets a user read its own processes' disk counters.
  • Commands hide secrets before they leave the machine: a URL shows only scheme://host, and the value after a flag like --password, token, key, secret, auth, cookie or header shows as ***. The environment is never read.
  • Filter by machine, type, user, state, minimum CPU or memory, and search name, command or PID. Filters stay in the address, so you can share a link.
  • A node built before this feature shows only its ffmpeg processes with the note "Update the node to see all processes".

Only admins with nodes:read see this page. Resellers get 403.

Bitstream documentation