HiveMQ Cloud offers a range of subscription plans to cater to your specific needs, and the Starter subscription is an excellent choice for those who are just getting started with MQTT-based messaging. In this article, we will break down how costs are calculated for the Starter subscription to help you understand your billing.
Monthly Base Cost Calculation
The monthly base cost is calculated as follows:
Base Cost = $0.34 * 31 days * 24 hours ≈ $252,96
This base cost is a fixed amount that you will pay monthly, regardless of your message rate.
Message Cost Calculation
Message Size Estimation
For billing purposes, we estimate a payload size of approximately 5KB per message. This estimation includes the message's topic, headers, payload, and, if you're using MQTT5, user properties. It's important to note that only PUBLISHED messages are counted towards your bill.
Message Count Normalization
To ensure fair billing and standardize message sizes, we 'normalize' messages to a value of 5KB. This means that if your message is under 5KB, it is counted as a single message. However, if your message is larger, the count increases. For example, an 8KB message would be counted as two normalized messages.
Here's a quick breakdown:
Messages under 5KB = 1 message.
Messages between 5KB and 10KB = 2 messages.
And so on, following this pattern.
Message Rate Cost Calculation
The cost for the message rate depends on the message rate itself, the number of clients, the number of messages each client sends per day, and the duration of the month.
Here's the formula for calculating the message rate cost:
Message Rate Cost = (Rate per 1,000,000 messages) * Number of Clients * Messages per Client per Day * Days in the Month
Example 1: Messages under 5KB
Let's say you have 30,000 devices, and each device sends 100 messages per day. The cost would be:
bashCopy code
Message Rate Cost = ($0.80 / 1,000,000) * 30,000 * 100 * 31 ≈ $74.4
Example 2: Messages between 5KB and 10KB
If your published messages are, on average, 8KB in size, the calculation is similar. However, since messages are normalized to 5KB for billing purposes, you need to account for the larger size:
bashCopy code
Message Rate Cost = ($0.80 / 1,000,000) * 30,000 * 200 * 31 ≈ $148.8
In this case, the message rate cost is doubled because each message is counted as two normalized messages.
Understanding these calculations will help you estimate and manage the costs associated with your HiveMQ Cloud Starter subscription effectively. If you have any further questions or need assistance with your subscription, don't hesitate to reach out to our support team.