At HiveMQ, we value transparency and want to ensure our users have a clear understanding of how connections are accounted for in the paid plan, particularly when it comes to MQTT client sessions. This article provides a concise breakdown of what the "MQTT Client Sessions" counter on the web page displays and how sessions are counted.
How are Sessions Counted?
The counting of sessions in the paid plan aligns with the concurrent MQTT client sessions. Each active MQTT client session is considered as one connection. It's important to note that if a client device establishes multiple sessions simultaneously, each session is treated as a distinct and separate connection. This count is reset to zero at the conclusion of each monthly billing period.
Example Illustration:
To illustrate this concept, let's consider two scenarios:
Multiple Connections Within the Hour:
If 37 client devices connect every hour on the hour and disconnect after 10 minutes, the total connection count for the day remains 37.
Combination of Persistent and Non-Persistent Sessions:
Suppose 10 client devices connect with a persistent session (cleanSession flag is set to false) and disconnect. Additionally, another 27 devices connect on the hour for 10 minutes before disconnecting. The total connection count for the day, in this case, also sums up to 37.
These examples highlight the straightforward approach of counting each MQTT client session as an individual connection, providing clarity on how your usage is reflected in the "MQTT Client Sessions" counter.
For a more detailed breakdown of the cost associated with different HiveMQ services, please refer to our pricing page here. Additionally, specific details on what qualifies as a session can be found in the technical FAQ section towards the bottom of the page.