3 ms·
Another honest question. Given the availability of way better options like zmq, nng, etc, why do people still reach for raw udp/tcp? Maybe read this as "I reco
by jvanderbot 3y ago
Another honest question. Given the availability of way better options like zmq, nng, etc, why do people still reach for raw udp/tcp?
Maybe read this as "I recommend ..."
- feschber 3y agoudp is supported everywhere and also in the rust standard library as well as tokio. zmq and nng from what I can tell are both implemented on top of the transportation layer and use tcp under the hood. Udp also has other advantages besides speed. - Its session less, so any device going offline can simply come back online without needing to reestablish a tcp handshake. - The udp header is also substantially smaller than a tcp segment header (8 Bytes vs >= 20 Bytes). Not a huge difference but adds up to at least 12 KiB/s with a packet rate of 1000Hz and that is without the (potential) overhead of additional protocols like zmq or nng on top. In this particular scenario the reliability of tcp is also not really necessary in my opinion. I think overall it may be worth investigating if there is a noticeable difference.