I want create a c++ application to send (ie. broadcast) data from one linux machine to multiple linux machines. Assume the linux machines are all under one switch and they are all under the same subnet.I'm seeing that this can be done using UDP multicast similar to Boost ASIO examples. In trying to maximize data throughtput, could I expect better performance using multiple UDP streams?
Better throughput - multicast or multiple UDP streams
linux;networking;c++
Yes, with multicast the data will be sent only once to the switch, which can pass it on to all receivers simultanously. With UDP, data needs to be sent to each receiver individually. So (in theory), max throughput with multicast as n times greater than with singlecast, where n is the number of receivers.Note that both with UDP singlecast and UDP multicast you'll have to deal with dropped packets and resending (unless the data is video/audio where the occasional dropped packet doesn't matter, but then you don't have to implement your own solution, just use a ready-made one), so use the appropriate protocol (PGM, ...).