Decreased Message Throughput During MQTT Broker Deployment
Problem
During deployment on the MQTT Broker, a decrease in incoming and outgoing message throughput was observed.
Symptoms
Reduced message throughput (incoming/outgoing messages per second)
Performance degradation during deployment operations
Potential impact on connected clients and message delivery
Diagnostic Steps
To properly diagnose throughput issues during deployment, collect the following information:
1. Collect HiveMQ Metrics
HiveMQ's metrics are essential for analyzing deployment behaviour and throughput patterns. Export metrics from Prometheus or Grafana to analyze the full set of performance indicators.(1)(https://hivemq.atlassian.net/wiki/spaces/KB/pages/2711486465/HiveMQ+Support+-+Customer+Onboarding+Readiness+Process+Tabular+Format)
2. Review HiveMQ Logs
Examine the following log files on all cluster nodes:(1)(https://hivemq.atlassian.net/wiki/spaces/KB/pages/2711486465/HiveMQ+Support+-+Customer+Onboarding+Readiness+Process+Tabular+Format)
$HIVEMQ_HOME/log/hivemq.log$HIVEMQ_HOME/log/event.log$HIVEMQ_HOME/log/migration.log
These logs provide information about:
Overload Protection activation
Cluster member joins/departures
Rolling upgrade status
Performance-related events
3. Create Thread Dump Series
If resource congestion cannot be explained through logs and metrics, capture thread dump series to identify heavy consumers and processing bottlenecks.(1)(https://hivemq.atlassian.net/wiki/spaces/KB/pages/2711486465/HiveMQ+Support+-+Customer+Onboarding+Readiness+Process+Tabular+Format)
4. Generate Diagnostic Archive
For HiveMQ version 4.2x or greater, generate a Diagnostic Archive from the HiveMQ Control Center. This includes:(1)(https://hivemq.atlassian.net/wiki/spaces/KB/pages/2711486465/HiveMQ+Support+-+Customer+Onboarding+Readiness+Process+Tabular+Format)
Cluster member information
Configuration details (passwords redacted)
Thread dump series
Short snippet of HiveMQ metrics
Common Causes and Solutions
Cluster Communication During Deployment
During deployment operations, intra-cluster communication patterns may change, potentially affecting throughput. The cluster transport handles replication, metrics collection, and maintenance functions.(2)(https://www.hivemq.com/blog/hivemq-4-18-delivers-higher-mqtt-throughput)
Resource Constraints
Verify that system requirements are met:(1)(https://hivemq.atlassian.net/wiki/spaces/KB/pages/2711486465/HiveMQ+Support+-+Customer+Onboarding+Readiness+Process+Tabular+Format)
Minimum CPU/RAM criteria
At least 50% of RAM available
Adequate heap configuration
Overload Protection Activation
Check logs for Overload Protection activation, which may throttle connections or apply TCP back-pressure during high load.(1)(https://hivemq.atlassian.net/wiki/spaces/KB/pages/2711486465/HiveMQ+Support+-+Customer+Onboarding+Readiness+Process+Tabular+Format)
Resolution Steps
Verify Rolling Upgrade Process - Ensure rolling upgrades are performed correctly, waiting for each node to be ready before proceeding to the next node (as indicated in logs)(1)(https://hivemq.atlassian.net/wiki/spaces/KB/pages/2711486465/HiveMQ+Support+-+Customer+Onboarding+Readiness+Process+Tabular+Format)
Monitor Cluster Stability - Check that all cluster nodes have rejoined and are functioning properly after deployment
Review Resource Utilization - Confirm adequate CPU, memory, and network capacity during deployment operations
Check Downstream Systems - Verify that databases and analytical applications can handle the message load from the broker
Analyze Metrics - Review exported metrics to identify specific bottlenecks or resource constraints
Prevention and Best Practices
Maintain steady resource utilization during your upgrade
Before you shut down a node with an old version, we recommend that you add a node to your cluster that is configured with the target version. This method is particularly important for clusters that have high resource utilization. For example, if your cluster runs with over 60% CPU usage. When you remove a node from your cluster during the upgrade process, the workload of the node you remove is redistributed over the nodes that remain in the cluster. This redistributed workload increases the amount of work each remaining node must do. The addition of a new node, before you remove any of the existing nodes, helps you maintain a steady workload in your cluster as you upgrade each node to the new version. Once all previously-existing nodes are upgraded, you can remove the node that you added to the cluster.
Deployment Planning
Schedule deployments during low-traffic periods when possible
Ensure adequate capacity headroom before deployment
Test deployment procedures in non-production environments first
Monitoring
Implement continuous monitoring of HiveMQ metrics via Prometheus/Grafana(1)(https://hivemq.atlassian.net/wiki/spaces/KB/pages/2711486465/HiveMQ+Support+-+Customer+Onboarding+Readiness+Process+Tabular+Format)
Set up alerts for throughput degradation
Monitor cluster health indicators during deployments
Capacity Management
Regularly review system requirements and resource utilization(1)(https://hivemq.atlassian.net/wiki/spaces/KB/pages/2711486465/HiveMQ+Support+-+Customer+Onboarding+Readiness+Process+Tabular+Format)
Plan for growth and scale infrastructure proactively
Consider that HiveMQ 4.18 and later versions deliver significantly higher throughput on many-core instances (32+ cores)(2)(https://www.hivemq.com/blog/hivemq-4-18-delivers-higher-mqtt-throughput)
Additional Resources
For further assistance with throughput issues:
Visit HiveMQ Community
Visit Contact HiveMQ Support
Visit HiveMQ Documentation
Related Information
HiveMQ 4.18 and later versions provide up to 80% higher throughput on many-core instances(2)(https://www.hivemq.com/blog/hivemq-4-18-delivers-higher-mqtt-throughput)
HiveMQ 4.24.0 and 4.9.15 (LTS) include optimizations that increase QoS1 message processing by approximately 50%(3)(https://www.hivemq.com/blog/boosting-mqtt-broker-efficiency-improved-threading)
Proper cluster transport configuration is critical for maintaining throughput during operations(2)(https://www.hivemq.com/blog/hivemq-4-18-delivers-higher-mqtt-throughput)
—
Labels: kb-troubleshooting-article, throughput, deployment, performance, mqtt-broker
```