linuxcluster-computingmonitoringmulticastunicast

Multicast and Clustering


I was going to use Ganglia for cluster monitoring, and have shown the following picture from O'Reilly book about Ganglia to our management:

enter image description here

They saw "Multicast" in this picture and said that it was "Big No" for clustering for performance reasons. My impression was absolutely opposite - the Multicast protocol is more simple to configure, and more economical and effective, than the Unicast.

Any big reasons, why cluster designers should be afraid of the Multicast?


Solution

  • The main potential "gotcha" with multicast is that a lot of network switches don't implement IGMPv3 (or MLDv2 for IPv6), and instead they just broadcast every multicast packet to every device on the LAN, and rely on each device's IP stack to filter out any irrelevant incoming multicast packets locally. That technically works (and keeps the switch's implementation simple) but it does mean that any slow(ish) devices on the LAN might suffer from performance problems if they have to devote a lot of their network bandwidth and/or CPU time to examining and throwing away lots of multicast packets they never asked for.

    On the other hand multicast (or broadcast) is practically a requirement to do things like automatic discovery of devices on the LAN, since you can't use unicast communication to communicate with another device unless you already know that device's IP address.

    My suggestion, then, would be to use multicast for discovery, heartbeats, and other low-bandwidth traffic, but if you're planning to do something high-bandwidth (e.g. video streaming or bulk data transfer), either plan to be able to fallback to unicast, or make sure your switches implement IGMPv3/MLDv2 and don't just spam multicast packets everywhere.

    One last note: WiFi is really bad at multicast -- due to the unfortunate way that multicast-over-WiFi was implemented, even a modest amount of multicast traffic can bring a WiFi router to its knees. So if you're planning to use multicast, you'll probably want to either keep any WiFi routers off of the LAN entirely, or at least make sure you can set them up to filter out multicast packets rather than trying to forward them to their WiFi clients.