What is Multi-Node Encoding?
Multi-node encoding distributes video transcoding jobs across multiple physical machines, dramatically reducing total encoding time. How it works:- Main Node: Owns the PostgreSQL database, distributes jobs, hosts the web UI
- Child Nodes: Worker-only nodes that pull jobs from the main node’s queue
- Shared Storage: NFS mount ensures all nodes access the same video files
- Automatic Load Balancing: Jobs are distributed based on each node’s current load and capacity
Architecture
The main node owns the database and web UI. Child nodes are workers that connect to the main node’s database.Prerequisites
Before setting up multi-node:Shared Storage Required
All nodes must access the same video files via NFS/SMB network mount.Without shared storage, child nodes cannot read source videos or write encoded files.
Main Node
- PostgreSQL 15+ (8GB RAM recommended)
- Docker + Docker Compose
- NFS mount to video storage
Child Nodes
- Docker installed
- NFS mount to same path as main node
- Network access to main node
Setup Instructions
Step 1: Configure NFS Server
On your NAS or file server:Step 2: Mount NFS on All Nodes
Mount the shared storage at the same path on every node:/etc/fstab:
Step 3: Deploy Main Node
On the main node (192.168.1.100):Step 4: Deploy Child Nodes
On child node 1 (192.168.1.170):Step 5: Verify Node Registration
Check the web UI athttp://192.168.1.100:4210:
- Go to Settings → Nodes
- You should see:
- Main Node (192.168.1.100) - Status: ONLINE
- Child Node 1 (192.168.1.170) - Status: ONLINE
- Child Node 2 (192.168.1.171) - Status: ONLINE
How Job Distribution Works
BitBonsai uses smart load balancing:- User scans library → Jobs added to queue (status: QUEUED)
- Scheduler polls every 5 seconds
- For each node:
- Check current load (active jobs / max concurrent)
- If load < 100%, assign next QUEUED job to this node
- Node picks up job → status changes to ENCODING
- Job completes → status changes to COMPLETED
Troubleshooting
Child Node Not Appearing in UI
Symptom: Child node started but not visible in Settings → Nodes Fix:Jobs Stuck in QUEUED
Symptom: Jobs remain QUEUED, no node picks them up Fix:- Check all nodes are ONLINE in Settings → Nodes
- Verify NFS mounts are working:
- Check logs for errors:
File Not Found Errors
Symptom: Job fails with “ENOENT: no such file or directory” Fix:- Verify NFS mount path is identical on all nodes
- Check NFS permissions (should be
rw, notro) - Test file access:
Performance Tips
| Tip | Why |
|---|---|
| Use 10GbE network | NFS throughput critical for 4K video |
| Enable NFS async mode | Faster writes (use UPS for safety) |
| Match NFS mount paths | Avoids path rewriting overhead |
| Use SSD for database | Faster job updates and queries |
| Monitor node load | Add nodes when load > 80% consistently |
Related Guides
- GPU Acceleration - Add GPU support to nodes
- Monitoring - Track multi-node performance
- Troubleshooting - Fix common multi-node issues