KRZN.live
Features

Cluster: standby and load balancing

Two or more central computers can work as one KRZN Live:

There is always one main computer: it runs the tunnel and owns the settings. The other computers are its standby computers (standby mode) or its load-balancing computers. When the main computer stops, the computer with the highest priority becomes the main computer.

How it works

The computers never talk to each other directly: they all talk to the VPS edge, that every central computer already reaches. The edge keeps a lease: the computer that holds it is the main computer, and renews it every 2 seconds. When the main computer stops, its lease ends after 8 seconds and the next computer gets it.

                 VPS edge (hub: lease, configuration)
               /            |             \
     PC-A (main)       PC-B (standby)      PC-C (standby)
     tunnel, NDI       ready to take over

Requirements

Create a cluster

On the computer that will be the main one: Settings > Cluster, choose Standby or Load balancing, then Create a cluster. The cluster is created on the edge.

Add a computer

  1. On the main computer: Status > Cluster > Add a PC. A join code is shown, as text and as a QR code. It contains the key of the cluster and the password of the edge: share it only with the computers of your setup.
  2. On the new computer: install KRZN Live (download page), open Settings > Cluster, paste the code in Join a cluster.
  3. The new computer receives the settings and stream paths of the main computer within seconds (a copy of its previous configuration file is kept as krznlive.yml.bak-before-cluster-...) and appears in the cluster panel.

A computer installed from the download page always starts alone: it never contains the key of the cluster.

Standby mode

Main computer Standby computers
Tunnel, site pages, intercom yes no
Edge feeds pulled, published as NDI, recorded hot: pulled and recorded (dual recording), not published as NDI. warm: not pulled
Other paths (home route, inputs) run read from the main computer when watched

Load balancing mode

Each path runs on one computer (its owner): it pulls the feed, publishes the NDI output, receives the NDI or camera input, records. The other computers read the path from the owner only when someone watches it (multiviewer, thumbnails).

The cluster panel

Status > Cluster shows every computer: role, heartbeat, version, CPU, GPU, memory, disk, what it runs. Buttons:

On a computer that isn't the main one, the shared settings and the stream paths are read-only (a banner says where to change them).

Settings

Setting Default Shared Meaning
cluster none yes none, standby or balance
clusterName krznlive-main no name of the cluster: several clusters can use the same edge
clusterNodeName empty no name of this computer (empty: the name of the computer)
clusterKey empty no shared secret, given by the join code
clusterPriority 10 no higher: preferred main computer
clusterCanBeMain true no false: this computer only works for the others
clusterHandBack auto yes auto or manual
clusterStandby hot yes hot or warm
clusterDualRecord true yes hot standby computers record too
clusterAutoBalance false yes move paths of an overloaded computer, when nothing is live
clusterCoordinateOnly false no the main computer runs no path (load balancing)
clusterMaxNDIOutputs 0 no at most this many NDI outputs here (0: no limit)
clusterSharedNDINames true yes NDI names without the computer name
clusterLANAddress empty no address used by the other computers to read the streams of this one (empty: automatic)
clusterHub false no on the edge only
path clusterPin empty yes the path always runs on this computer (ID or name)
path clusterSpare false yes spare NDI output on a second computer

Settings that belong to each computer are never copied: the ones above marked "no", the NDI runtime and FFmpeg folders, the video decoding, the dashboard address, the window and tray options, logs and updates.

Alerts

Only the main computer sends alerts, so they don't arrive once per computer. A takeover is reported with its measured times, for example: PC-A stopped answering at 10:42:15; PC-B took over (NDI after 10.9 s, tunnel after 8.2 s) (counted from the last heartbeat of PC-A).

Measured (two computers, on one test machine)

Case Result
Main computer killed (power cut) new main computer after 7 to 8 s; tunnel at once (0.1 s after); NDI picture 2.8 s after (hot standby)
Planned switch (Make main, Test failover) 1 to 2 s for the lease and the tunnel, 4 to 5 s until the NDI picture
Main computer loses the edge it stops its tunnel and NDI outputs after 7.7 s, before the lease ends (8 s)
Edge restarted nobody takes over: the main computer keeps its lease
Edge down for everyone every computer stops what could conflict; when it's back, the computer with the highest priority is main again
Load balancing, a computer stops its paths move after about 6 s, live with NDI after about 7.5 s

Limits

Message us