Hacker News new | ask | show | jobs
by InkCanon 550 days ago
I'm somewhat skeptical about your conclusion that the TCP handshake and other possible overheads are the problem.

1) In the worst case you're transmitting one packet for each connection, this requires you to send two handshake packets. The TX time alone cannot be more than a few milliseconds per packet. Once every 5-15 minutes is negligible

2) MQTT uses TCP by default, unless you use one of its variants

3) Leaving RX on is inevitable if you want real time connection, this is likely a far larger draw than the handshake

4) You could also configure the keep alive tcp connection value on the server and reuse the same connection