A Comparative Study of HTTP and MQTT for IoT Applications in Hydroponics - Nugraha, Irvan Rizki; Putra, Widhy Hayuhardhika Nugraha; Setiawan, Eko (Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), 2024)
Hydroponics is based on nutrients in water. It must be regularly monitored to prevent plant defects. The Internet of Things has become a solution for remote hydroponic monitoring and is currently being tested on the Yuan Hidroponik Kelompok Wanita Tani (KWT). This system will send data every minute, and each data has a possibility of loss in transmission. There is a chance that this system will be implemented in other hydroponic organizations. As more devices are involved, it will affect server resources. This research will compare Message Queue Telemetry Transport (MQTT) and Hypertext Transfer Protocol (HTTP) as popular protocols used in IoT. A test with increasing clients shows that at 50 clients HTTP needs 87% CPU, while MQTT needs 22.63% CPU. A test with increasing payload shows that at 10,000 payload HTTP needs 94% CPU while MQTT needs 28.35% CPU. A test with fixed clients and payloads shows that HTTP has a CPU limit based on the clients involved. A transfer time test shows that HTTP needs 177.344 seconds while MQTT needs 3.24 seconds. An acceptance rate is calculated by incrementing the count for every incoming payload. It shows that HTTP can receive 30,000 payloads, unlike MQTT which can only receive 1680 payloads before losses.