Search code examples
thingsboard

Thingsboard - MQTT vs HTTP


I am using HTTP and MQTT protocols to send data in JSON format from my local machine to a server in the Cloud.The server has Thingsboard installed. I am sending data to 256 Thingsboard devices. While doing performance testing for HTTP and MQTT, I found that HTTP took lesser time to send the data whereas I had heard that MQTT is a faster protocol. So my question was - under what conditions is MQTT a faster protocol than HTTP?


Solution

  • In the case where you have devices that are polling the server for updates via http, mqtt will be faster because the devices maintain a persistent connection and will get the updates immediately without having to wait for the poll interval.