Complete End-to-end IoT Solution Testing with HiveMQ Swarm

Complete End-to-end IoT Solution Testing with HiveMQ Swarm

author portrait

Written by Mary Brickenstein Hofschen

Category: HiveMQ IoT Testing

Published: May 5, 2021


Companies that deploy Internet of Things solutions know that correcting errors in the field is costly and inefficient. Unlike traditional applications where it might be possible to fix an error by deploying new software server-side, updating firmware on all your IoT devices in production can be hard on your finances as well as your brand. Here at HiveMQ, we work with Fortune 500 companies that run some of the largest IoT deployments in the world. For many of these companies, adequate testing of mission-critical IoT deployments, before they release to the field, is a big challenge.

Connected car applications are a good case in point. A major car manufacturer can ship upwards of 10 million cars in a single year. Most of these vehicles have some kind of connected functionality. Given that MQTT is the protocol of choice for IoT, connected-car solutions usually employ a mix of MQTT brokers, databases, streaming platforms such as Apache Kafka, and a multitude of devices and sensors. To avoid potentially difficult and expensive fixes in the field, car manufacturers require accurate stress and load testing of their entire platform. However, achieving end-to-end testing of a state-of-the-art IoT system is extremely hard without the right tools. The behavior of an entire system can be very organic, and the complexity of behavioral patterns increases even further in the hands of the end-user.

The core difficulty arises from the fact that most test environments bear little resemblance to the actual production environment. Particularly in Industrial IoT, test systems rarely have the same components, workload, and usage patterns as the production system. As a result, it’s nearly impossible to thoroughly simulate production behavior. Instead, companies try to make do with emulating small portions of complex behaviors. Realistically speaking, the efficacy of this sort of piecemeal testing is limited.

When you connect millions of MQTT clients over millions of open TCP connections, it’s risky to assume that all implementations will run as smoothly as planned straight out of the box. Although there are plenty of options for testing web applications on the internet of humans, until now, there hasn’t been much around for testing Internet of Things workloads.

HiveMQ Swarm

The good news is, HiveMQ just added a unique new MQTT load and reliability testing tool to the HiveMQ platform that is on course to fill the gap in IoT testing and satisfy a lot of companies’ needs. The tool is called HiveMQ Swarm, and it is the industry’s first solution that enables organizations of all sizes to reliably simulate and test IoT applications at any scale, on any environment, and at any level of complexity.

HiveMQ Swarm is a distributed platform that can create millions of unique network connections. This tool is built around MQTT which means that you can simulate millions of devices, messages, and MQTT topics. HiveMQ Swarm allows you to develop reusable scenarios that simulate complex device behaviors and gives you the ability to test at an extreme scale against any MQTT infrastructure.

Reusable Scenarios

Declarative custom scenarios are a huge deal because they offer a descriptive way of modeling how things behave. When you run a scenario, adjustments like scaling the number of devices are as simple as changing a parameter. HiveMQ Swarm is smart enough to figure out how to distribute load intelligently and globally to all available load generators. With HiveMQ Swarm you can move beyond basic stress and load testing to other use cases such as functional testing.

Custom Data Generation

Applications frequently expect specific data formats such as a JSON format or a protocol buffer format. The custom data generators HiveMQ Swarm provides let you program complex data formats for your use cases directly with a Java SDK to match your specific business requirements. For example, HiveMQ Swarm can generate Sparkplug workloads based on its custom data generators. This sort of capability is very interesting since the Sparkplug specification is gaining traction as one of the most important specifications for IIoT. With increasing MQTT adoption, more industry-specific standards for payload formats are expected.

Absolute Portability

HiveMQ Swarm is resource-friendly. You can deploy it anywhere. Since HiveMQ Swarm is not a hosted solution, you can run a Swarm deployment on your local machine or in the cloud on any cloud provider. You can run it on Kubernetes and OpenShift. The choice is yours. HiveMQ Swarm is truly portable.

This flexibility is significant because a growing number of use cases require utilizing some load generators on AWS, some on Azure, and some in different regions. HiveMQ Swarm is a true multi-cloud solution that you can operate and host yourself. This is not a software-as-a-service offering, you can deploy HiveMQ Swarm wherever you want.

Diverse Use Cases

The obvious use case for HiveMQ Swarm is for load and stress testing because there simply isn’t any tool available that can produce extreme IoT workloads so easily. However, HiveMQ Swarm use cases don’t end there. Quality assurance is another area where companies are interested in using HiveMQ Swarm. For example, adding Swarm to a continuous deployment pipeline to verify the behavior of new microservices that consume MQTT messages. Our customers are also keen to use HiveMQ Swarm to test their custom HiveMQ extensions. HiveMQ provides an attractive extension framework that many companies use to integrate their MQTT broker and enterprise infrastructure with custom extensions. HiveMQ Swarm is the ideal tool for testing the behavior of these extensions.

Solid Planning

Smooth growth thrives on accurate planning. For many companies, it is very important to understand exactly how their current development plans impact the entire system. For example, what the backend infrastructure looks like if the number of devices sold each year doubles. The same is true for the industrial IoT space. Let’s say you want to expand your gateway infrastructure, add a new SCADA system, or increase the primary and secondary applications in a Sparkplug space. You need to discover potential bottlenecks in your system, but it is hard to do. The ability to build reusable declarative scenarios that HiveMQ Swarm provides is a real game-changer. With HiveMQ Swarm, you can build scenarios that truly match your planned use case. Put the scenarios on version control. Copy and modify your testing parameters as needed. You can even build your own library of different test scenarios and use them to automate the testing of your entire solution.

Flexible Setup Options

You can start up HiveMQ Swarm on your local machine with no additional requirements, or you can opt to set it up in a distributed way. Distributed setups let you create large-scale tests with hundreds of data generators around the world that you start and stop directly from your command-line tool. HiveMQ Swarm workloads are very straightforward. You create text-based scenarios that are easy to modify and execute the scenarios in a simulation environment. You can watch the progress of your scenario live, or take a break and check the reports once the work is done. If your goal is to see where the breaking point of your system is, you can easily increase the load of your stress tests and see what breaks. If you are more interested in functional testing, you can alter the loads in your scenarios and watch what happens to your application.

Scalability, Integration, Monitoring, and More

Swarm officially supports up to 10 million real MQTT connections (although Beta users have already noted that this number can be exceeded by a large margin). This elastic scaling is extremely relevant for IoT testing. Beyond the remarkable scalability, HiveMQ Swarm offers built-in monitoring, logging, and reporting as well as a Prometheus-compatible REST API (the first of its kind) that makes it possible to incorporate HiveMQ Swarm into your centralized infrastructure. For developers who use the popular open-source MQTT CLI command-line tool for their MQTT application development, HiveMQ Swarm even provides full MQTT CLI support. Whether you currently utilize Prometheus, Grafana, InfluxDB, or pretty much anything else, the deployment of HiveMQ Swarms to your existing cloud or on-premiss solution is convenient and resource-friendly. Another big plus: like all HiveMQ products, HiveMQ Swarm provides full support for all versions and features of the MQTT specification. This means you don’t have to worry about vendor lock-in or proprietary-version roadblocks.

See HiveMQ Swarm in Action

To better understand how HiveMQ Swarm works, check out the live demo section of the Revolutionizing IoT Testing - Sneak Peek webinar from HiveMQ. The CTO of HiveMQ, Dominik Obermaier, introduces the session (including a brief introduction to the MQTT protocol) followed by a concise demo of HiveMQ Swarm from Georg Held, the engineering manager at HiveMQ.

Launch Your Own Swarm Today

HiveMQ Swarm is included in the newly released HiveMQ 4.6 platform. If you’re curious and want to try out HiveMQ Swarm right away, you can download HiveMQ immediately from the HiveMQ website. The free trial version of the HiveMQ platform lets you test HiveMQ Swarm scenarios with up to 25 MQTT devices at no cost and with no commitment. Full documentation is also provided online. As with all HiveMQ trials, if your evaluation requires a larger number of devices, you can contact HiveMQ to request a no-cost extended evaluation license.

About Mary Brickenstein Hofschen

Mary is a technical writer at HiveMQ. She enjoys providing up-to-date information that HiveMQ users can rely on.

contact the HiveMQ team

newer posts HiveMQ 4.5.4 Maintenance Release
What's New in HiveMQ 4.6? older posts