Open In App

Difference between MQTT and HTTP protocols

Improve
Improve
Like Article
Like
Save
Share
Report

1. Message Queuing Telemetry Transport (MQTT) :
It was created by Andy Standford-Clark and Arlen Nipper. It is an IoT interaction protocol based on the Publish/Subscribe model. This model is a simple model that provides support for QoS (Quality of Service). Due to its abilities, it can be found in every second IoT based device. This protocol has many features as it is over TCP and uses SSL/TLS for security. For messaging between server it uses CONNECT, PUBLISH, SUBSCRIBE, DISCONNECT, etc.



2. Hyper Text Transfer Protocol (HTTP) :
It is used by World Wide Web (WWW) for defining how its messages are going to be transmitted and formatted. This protocol is responsible for the action that a server has to take while sending information over the network. When a URL is being entered into the browser, this protocol sends an HTTP request to the server and then an HTTP response is sent back to the browser. This protocol is also responsible for the controlling of webpages on the World Wide Web for their formatting and representation.



Difference between MQTT and HTTP protocols :

Parameter MQTT HTTP
Abbreviation Message Queuing Telemetry Transport Hyper Text Transfer Protocol
Architecture It works on publish/subscribe model. It works on request/response model.
Complexity It has less complexity. It is more complex.
Runs over It runs over Transmission Control Protocol. It runs over Transmission Control Protocol (TCP) and can also adapted to User Datagram Protocol.
Protocol Design This protocol’s design is Data centric. This protocol’s design is Document centric.
Message Size The message size generated is less as it uses binary format. The message size generated is more as it uses ASCII format.
Header Size It is of 2 bytes. It is of 8 bytes.
Port Number It works on 1883 port. It works on 80 or 8080 port.
Data Security It provides data security with SSL/TLS. It does not provide security but Https is built for that.


Last Updated : 11 Nov, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads