Docs
Run two agents on two ISPs.
This is the practical setup for dual-internet resilience: one Beam Networks Stream agent on the primary connection, one on the backup connection, both reading the same OBS HLS output.
Recommended shape
- Use the same
stream_idon both agents. - Use different
agent_idvalues, usuallyprimaryandbackup. - Use different API keys so each agent can be rotated or revoked independently.
- Use separate cache directories even if both agents watch the same HLS directory.
Example config split
stream_id: "your-stream-id"
agent_id: "primary"
api_endpoint: "https://ingest.beamnetworks.stream"
api_key: "sk-live-primary"
hls_watch_dir: "/tmp/obs-hls"
cache_dir: "/var/lib/beam-agent-primary" stream_id: "your-stream-id"
agent_id: "backup"
api_endpoint: "https://ingest.beamnetworks.stream"
api_key: "sk-live-backup"
hls_watch_dir: "/tmp/obs-hls"
cache_dir: "/var/lib/beam-agent-backup" Option A: Linux network namespaces
Use a dedicated namespace when both ISPs are connected to one Linux machine and you want hard separation between the two network paths.
- Create a namespace such as
beam-backup. - Move the second NIC into that namespace, or connect it with a veth pair.
- Assign the namespace its own IP and default route through ISP 2.
- Verify it exits a different public IP than the main namespace.
- Run the backup agent inside that namespace.
sudo ip netns exec beam-backup ./beam-agent --config /etc/beam/agent-backup.yaml Option B: Policy routing
Use policy routing when both interfaces stay in the default namespace but outbound traffic should be pinned to different WAN links based on source IP or routing rules.
- Add a second routing table for the backup ISP.
- Add routes for that ISP into the new table.
- Add an
ip rulematching the backup agent source IP. - Bind the backup agent to that source IP if needed.
- Verify both agents exit through different public IPs before going live.
Verification checklist
- Both agents can reach
https://ingest.beamnetworks.stream. - Each agent exits through a different public IP.
- The dashboard shows both
primaryandbackup. - Stopping one agent does not stop the other path.
- Duplicate segments are accepted without ingest errors.