MQTT is a communication protocol that requires a small resource and bandwidth. MQTT uses a broker in charge of connecting publishers and subscribers. MQTT brokers, especially Mosquitto, do not have mechanisms to overcome failures caused by CPU overload or device damage when only one broker is used. Thus, it takes load balancer and some brokers. In this research, a load balancer performance analysis using round robin algorithm is used to distribute MQTT brokers workload. The study was conducted on a single host using virtualization. There are 4 virtual devices, namely 3 brokers and 1 load balancer. Subscriber subscribes to the topic by accessing the load balancer address. Testing is done by using load balancer as differentiator variable to know impact given load balancer to broker. The result shows that load balancer with round robin algorithm is able to distribute the load evenly with the condition of all connected clients without any interruption with 13.56%, 13.68% and 15.12% CPU load for each broker with request of 400 that receive 10 publish message for each client. Then the system is able to reconnect to other brokers with a speed of 1.007 seconds when traffic is low and 1.005, 2.791, 4.593, and 2.005 seconds when traffic is high. Finally, the broker's message distribution takes about 0.362, 0.687, 0.891, 1.199, and 1.622 seconds for the number of publish messages of 25, 50, 75, 100, and 125.
Copyrights © 2018