Friday, November 17, 2017

Long-term testing with MIMIC Simulator

What do our test systems do over the weekend? They run longer-term tests
that we cannot run overnight.

For example, they run one MIMIC MQTT Simulator test that continuously in
a loop starts 1000 sensors, publishes messages for a while, then stops
them, as might happen in a real-world scenario.

The code is as simple as this:

% while ( 1 )
    ./mimicsh --nogui --script mqtt-start-many.mtcl --args "1 1000 1000"
    sleep 10
    ./mimicsh --nogui --script mqtt-stop-many.mtcl --args "1 1000 1000"
end

With this simple 5-line test we found that a third-party MQTT broker
was failing after a while. Apparently it was not configured to handle the
"TCP SYN flood" that the OS detected.

Chalk it up to another configurable on brokers that we learned the
hard way.

 If your MQTT broker does not have the configurables for SYN flooding
in their documentation, then you will encounter this problem in your
deployment when all those sensor connections start flapping.

This is but one of the many tests that you can perform with MIMIC MQTT
Simulator on your MQTT broker before IoT deployment to avoid costly
problems in the real world.


No comments: