The Message Queuing Telemetry Transport (MQTT) is an OASIS standard messaging protocol for the Internet of Things (IoT). MQTT is a flexible and easy-to-use technology that provides effective communication within an IoT system. MQTT is a broker-based protocol and is widely used to facilitate the exchange of messages between clients and broker.
The following key benefits of MQTT make it a well-suited option for your IoT device:
IoT is the network of interconnected devices that are embedded with sensors, software, network connectivity, and necessary electronics. The embedded components enable IoT devices to collect and exchange data. The increase in use of IoT devices brings in multiple challenges for network infrastructure, with Scale being the prominent one. In a large scale deployment of IoT devices, the data generated by each IoT device needs to be analyzed swiftly. To achieve the scale requirement and efficient usage of resources, the load on the broker pool must be distributed evenly. With the support of the MQTT protocol, you can use the NetScaler appliance in IoT deployments to load balance the MQTT traffic.
The following figure depicts the MQTT architecture using a NetScaler appliance to load balance the MQTT traffic.
MQTT system
An IoT deployment with MQTT protocol has the following components:
-
MQTT broker. A server that receives all messages from the clients and then routes the messages to the appropriate destination clients. The broker is responsible for receiving all messages, filtering the messages, determining who is subscribed to each message, and sending the message to these subscribed clients. The broker is the central hub through which every message must pass.
-
MQTT client. Any device, from a micro controller up to a full-fledged server, which runs an MQTT library and connects to an MQTT broker over a network. Both publishers and subscribers are MQTT clients. The publisher and subscriber labels refer to whether the client is publishing messages or subscribed to receive messages.
-
MQTT load balancer. The NetScaler appliance is configured with an MQTT load balancing virtual server to load balance MQTT traffic.
In a typical IoT deployment, the broker (cluster of servers) manages the group of IoT devices (IoT clients). The NetScaler appliance load balances the MQTT traffic to the brokers based on various parameters, such as Client ID, topic, and user name.