A) HTTP vs MQTT
HTTP(S) doesn’t keep a connection open – so to get the “effect” of a continuous connection, the HTTPS client has to keep making poll requests, each of which involves creating the TCP connection and negotiating SSL/TLS encryption etc. each time a poll is needed. Whereas, MQTT makes a connection at the start, so the TCP and SSL/TLS overhead cost is only paid once. MQTT has a keep alive message flowing between applications on top of the TCP connection, so that the applications can detect when the connection is broken, this allows the MQTT broker to reliably publish the (optional) client last will/testament when the connection is broken.
Stephen Nicholas compared MQTT vs HTTPS on Android 3G smart phones whose results are,
93x faster throughput
11.89x less battery to send
170.9x less battery to receive
1/2 as much power to keep connection open
8x less network overhead [3]