Reputation: 31
I am working on an IoT project in which 10K devices are sending data every 5 seconds. In order to communicate with server, I use Mosquitto
MQTT broker. From the broker, a Laravel (Lumen exactly) application reads data, process it and add to database. In order to read data from MQTT to PHP, I am using the following package.
https://packagist.org/packages/salmanzafar/laravel-mqtt
This is working perfectly at low load, but when the high load is coming to the server, some of the packets are missing. It reaches MQTT, but not reaches to database through PHP.
Does anyone faced this issue ? I have only one topic. Can anyone suggest a better alternative library in PHP ?
Upvotes: 2
Views: 393
Reputation: 1473
Our testing with mosquitto suggests severe degradation around 1000 connections, mainly because it is a single-threaded broker. Of course, there are many variables that affect performance, but if you care about performance, you'll end up with a commercial broker.
Eg. see this blog post https://gambitcomm.blogspot.com/2018/08/video-monitor-end-to-end-latency-of.html which details end-to-end latency testing for 10k publishers.
Upvotes: 1