Skip to content
Related Articles

Related Articles

Difference between MQTT and HTTP protocols
  • Last Updated : 06 Jul, 2020

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 :



ParameterMQTTHTTP
AbbrevationMessage Queuing Telemetry TransportHyper Text Transfer Protocol
ArchitectureIt works on publish/subscribe model.It works on request/response model.
ComplexityIt has less complexity.It is more complex.
Runs overIt runs over Transmission Control Protocol.It runs over User Datagram Protocol.
Protocol DesignThis protocol’s design is Data centric.This protocol’s design is Document centric.
Message SizeThe message size generated is less as it uses binary format.The message size generated is more as it uses ASCII format.
Header SizeIt is of 2 bytes.It is of 8 bytes.
Port NumberIt works on 1883 port.It works on 80 or 8080 port.
Data SecurityIt provides data security with SSL/TLS.It does not provide security but Https is built for that.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :