Consider a network of 50 Linux machines connected to 1 TOR switch. 10 processes in this network are multi-cast transmitting long lived streams of data. Other processes in the network may or may not elect to listen to these mcast packets forwarded by the switch.
Is the following true?
* If IPV4 UDP multi-cast is used, the switch is obliged to forward all mcast packets to all 50 machines.
* If Mellanox Infinband mcast is used (and the TOR switch is infiniband compatible) the switch is not obliged to forward the mcast packets to all 50 machines. In fact, Mellanox Infiniband does mcast with subsciption. Receivers subscribe to a mcast channel (address). As such the switch only forwards mcast packets to subscribed receivers.
All-in-all, the Mellanox mcast approach is net more efficient. The switch forwards fewer packets to targeted receivers meaning all the work to get the packets into each NIC of all 50 machines, then into the kernel, and into the receiving processes is eliminated.
In contrast the UDP mcast is net less efficient. For example, if there's a machine with no listening receivers, that box would still get all mcast packets from all 10 producers only to be dropped somewhere in the kernel.
Nope. The switch (i've only used cisco/arista so ymmv) will keep a map of resolved macs that have made IGMP subscriptions and only forward to hosts thus subscribed to ip:port groups. View on your subscribing host (netstat -g). This is done in switch hardware, however new subs/changing macs is done in software.
Secondly there is/was (i might be out of date) a bug/wontfix in mcast subs in Linux that no matter the group unique IP, if you subbed on a port it would be forwarded to any group with the same port number. So isolate all services using unique port numbers if you have multiple consumers on one host. (see `man 7 ip` setsockopt IP_ADD_MEMBERSHIP)