Configure load balancing and geographic distribution
Relaying enables one Mcaster1DNAS server to mirror streams from another server, distributing listeners across multiple physical machines. This is essential for large-scale broadcasts requiring geographic distribution or load balancing. The master server provides the original content while slave servers relay it to their own listeners.
Mcaster1DNAS v2.5.1-rc1 supports two relay types:
Requires both master and slave to be Mcaster1DNAS servers. The slave automatically mirrors ALL mountpoints from the master and periodically checks for new mountpoints to relay. This provides complete automatic replication.
Relays a specific single mountpoint from any compatible server (Shoutcast, Icecast 1.x, or Mcaster1DNAS). This provides fine-grained control over which streams to relay.
Configure the slave server to automatically mirror all mountpoints from a master server. This configuration goes in the slave server's YAML file.
# Slave Server Configuration (mcaster1.yaml)
relay:
master:
server: 192.168.1.11
port: 8001
username: relay
password: hackme
update_interval: 120 # Check for new mounts every 120 seconds
redirect: true # Enable listener redirection from masterEnable load distribution by allowing the master to redirect new listeners to slave servers using HTTP 302 responses.
# Master Server (mcaster1.yaml) relay: max_redirect_slaves: 5 # Allow up to 5 slaves for redirection
# Slave Server (mcaster1.yaml)
relay:
master:
server: 192.168.1.11
port: 8001
username: relay
password: hackme
redirect: true # Register for redirectionRelay specific mountpoints with full control over configuration. This works with any Icecast-compatible server including Shoutcast.
# Slave Server Configuration (mcaster1.yaml)
relay:
relays:
- server: 192.168.1.11
port: 8001
mount: /example.ogg
local_mount: /different.ogg # Optional: rename on slave
username: relay
password: hackme
- server: shoutcast.example.com
port: 8000
mount: / # Shoutcast always uses /
local_mount: /shoutcast.mp3
relay_shoutcast_metadata: true # Include embedded metadatamount: /
and set relay_shoutcast_metadata: true to preserve song information embedded in the stream.
Deploy slaves in different geographic regions to reduce latency for listeners worldwide.
# Master in USA, Slaves in EU and Asia Master (USA): stream.example.com Slave (EU): eu.stream.example.com Slave (Asia): asia.stream.example.com
Distribute thousands of listeners across multiple servers to prevent overload.
# DNS round-robin or load balancer stream1.example.com → Slave 1 (relay from master) stream2.example.com → Slave 2 (relay from master) stream3.example.com → Slave 3 (relay from master)
Configure multiple slaves so that if one fails, others continue serving listeners.
Mcaster1DNAS v2.5.1-rc1 provides enhanced relay statistics:
http://slaveserver:8000/admin/stats.xml
Next Steps: Learn about Configuration Options or explore YP Directory Setup.