How to receive and deliver multicast streams without interruptions
When building an IPTV service based on multicast, there is an issue with multicast packet loss. Client devices can't handle multicast packet losses, so you have to minimize losses on the source side. Depending on whether you are a content provider or a client depends on what goal you are achieving:
- How to receive multicast streams without interruptions.
- How to deliver multicast streams without interruptions.
How to receive multicast streams without interruptions
Suppose you have several different multicast sources with the same content. The sources separately have low reliability, and you want your service to automatically switch to the working source.
If you configure to receive multicast packets from several different multicast groups, you will face the complexity of managing such an architecture. As the number of content providers and their multicast groups increases, so does the complexity of managing pairs switch-receiver.
If you configure IP source filtering on the receiver, the receiver will receive all multicast group traffic from the switch, overloading the channel between the switch and the receiver. As more content providers send traffic to the same multicast group, the channel overloads.
Use the SSM (Source-Specific Multicast) mechanism to receive multicast streams without interruptions.
Note
SSM mechanism requires a switch to support IGMPv3.
SSM works as follows:
- Each multicast packet transmits the source IP address in the header. The primary and backup sources simultaneously send data to the same multicast group.
- Using the source IP address, Flussonic calls the switch via IGMPv3 to send the multicast packets from the primary source.
- If Flussonic detects packet loss from the primary UDP source within source_timeout that is by default one minute, it switches to the backup source. Using the backup source IP address, Flussonic calls the switch via IGMPv3 to send the multicast packets from the backup source.
- While on the backup source, Flussonic polls the primary UDP source every minute for multicast packets.
- When the primary source comes back online and starts sending packets, Flussonic switches to it from the backup source.
Diagram 1. SSM with the online primary source
Diagram 2. SSM with the offline primary source and online backup source
To configure the SSM (Source-Specific Multicast) mechanism for the multicast stream in the Flussonic Admin UI, follow these steps:
-
Go to the Input tab of the stream settings.
-
Add a primary source if you don't have one or modify the existing one by specifying the multicast group, port, and IP address of the primary source like so:
udp://239.1.1.1:1234?sources=10.10.10.1
, where:
239.1.1.1.1
is the multicast group1234
is the port for Flussonic to listen to10.10.10.10.1
is the source IP address
-
Add a backup source by specifying the data as in step 2 for the backup source.
-
Apply the settings by clicking Save.
How to deliver multicast streams without interruptions
Suppose you are a content provider and have a server sending multicast streams. You want to deliver multicast streams with maximum reliability for your client so that the server automatically switches to a working server without interrupting the broadcast. You can configure a multicast failover mechanism with Flussonic standby mode for backup server.
Note
This approach works with any IGMP on the receiver, so your clients don't need to buy any special hardware.
Standby mode works as follows:
- The primary and backup servers output the same set of programs. The primary server sends the stream to the multicast group.
- The backup server constantly checks if any server sends the multicast packets to the multicast group and stays in standby mode.
- If the primary server goes offline, the backup server starts streaming.
- As the primary server comes back online, the backup server stops streaming and returns to standby mode.
Diagram 3. Multicast failover with the working primary server
Diagram 4. Multicast failover with the offline primary server and online backup server
To configure the standby mode for your multicast stream in the Flussonic Admin UI by following these steps:
- Go to the Output tab of the stream settings.
-
In the URL column of the Push live video to certain URLs section, specify the multicast group, port, and IP address of the primary server like so:
udp://239.1.1.1:1234
, where:
239.1.1.1.1
is the multicast group1234
is the port for Flussonic to listen to
-
Add a backup server by specifying the data as in step 2 for the backup server.
-
Open Options and enable the standby mode for the backup server by ticking the Standby box.
-
Apply the changes by clicking Save.