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 How Sessions are Counted:
In the HiveMQ Cloud, sessions align with concurrent MQTT client sessions. Each active MQTT client session is considered as one connection. It's important to note that if a client connection equals one session. Each persistent session, active or inactive, also counts as a session. If a device establishes multiple sessions simultaneously (using a different Client ID for each session), each session is treated as considered a distinct and separate connection. This count is Counts 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 Hourshort-time connections within an hour:
If 37 client devices connect connecting every hour on the hour and disconnect after 10 minutes, the total connection count for the day remains 37for a few minutes count as 37 connections.
Combination of Persistent persistent and Nonnon-Persistent Sessionspersistent sessions:
Suppose 10 client devices connect with a persistent sessionsessions (
cleanSession
flag is set tofalse
) 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.
...
+ 27 devices connecting hourly = 37 total connections.
Displaying Session Count:
The "MQTT Client Sessions" count at console.hivemq.cloud reflects the max session count reached in the current month, resetting monthly. It doesn't show active connections but the max count reached.
...
For detailed cost breakdowns and session qualifications, check our pricing page and technical FAQ on the page.