istro

Infrastructure

Cluster

Several Bistro machines that share work and watch each other.

A cluster joins several Bistro machines. You see each one's load, memory and disk. You can run a command on any machine, or on the least busy one.

bistro cluster create home
bistro cluster code                 # the join code
bistro cluster join CODE            # on another machine
bistro cluster add HOST             # on each machine, for every other member
bistro cluster nodes
bistro cluster run HOST -- uptime

#Discovery

Add each member by hand on every machine: bistro cluster add HOST. Bistro does not trust machines it finds on the network (mDNS), because any device on the LAN can announce itself.

#How Members Talk

Members use their own SSH channel and one shared key from the join code. The key only logs in as bistro-node. That account runs sudo bistro-node, which takes a short fixed list of requests: status, run-as and jobs.

#Least Busy

Bistro picks the machine with the lowest load per core plus share of memory in use, measured when the job starts. There is no queue and no job migration.

#Fleet

The fleet commands act on many machines at once.

bistro fleet status
bistro fleet run all --dry-run -- update
bistro fleet move jellyfin node2
bistro fleet failover on jellyfin node2
bistro fleet join-script          # a one-line command for a new machine, valid 1 hour

Failover means another member starts the app when this one is down. bistro ha gives one dashboard address that follows a working machine.