This topic describes the billable items and pricing for Basic and Platinum Edition instances of ApsaraMQ for MQTT.
Billing overview
ApsaraMQ for MQTT offers Basic, Platinum Edition instances. For more information about the differences between these instance editions, see Instance editions.
The Basic and Platinum Edition instances share the same billing methods and billable items. The billable items are as follows:
Billable item | Billing method | Billing cycle |
Subscription Bills are calculated based on the selected specifications and subscription duration. You pay before you use the service. | Monthly | |
The formula for calculating the instance fee is as follows:
Instance fee = (Unit price for maximum connections + Unit price for maximum message TPS + Unit price for maximum subscription relationships) × Subscription duration (in months)
Maximum connections
Billable item details
Connections refer to the number of client TCP connections on a specific instance at any given time. This number is a transient value that is updated every minute.
Ensure that the maximum connections you purchase exceed the peak number of online connections for your services. This prevents throttling when the limit is exceeded, which can cause some clients to fail to connect.
Example
If instance_a has 1,000 concurrent online connections at 10:00 and 2,000 at 10:01, you must purchase a maximum connections specification of more than 2,000, such as 5,000, to ensure normal service operation.
Unit price
Instance type | Maximum connections | Price (USD/month) |
Basic Edition instance | 1,000 | 29 |
5,000 | 142 | |
10,000 | 284 | |
20,000 | 567 | |
50,000 | 1,417 | |
100,000 | 2833 | |
Platinum Edition instance | 100,000 | 3,852 |
300,000 | 11,329 | |
500,000 | 18,805 | |
1,000,000 | 37,836 | |
2,000,000 | 75446 |
Maximum message TPS
Billable item details
Message Transactions Per Second (TPS) is the sum of messages produced and consumed per second on a specific instance. This value is updated every minute.
Ensure that the maximum message TPS you purchase exceeds the peak TPS for sending and receiving messages. This prevents throttling when the limit is exceeded, which can cause some message operations to fail.
Calculation rules
Message TPS includes only messages sent and received using ApsaraMQ for MQTT. It does not include messages sent and received using ApsaraMQ for RocketMQ.
For messages with a Quality of Service (QoS) level of 1 and cleanSession=false, if the server-side push fails, the message is stored as an offline message for retry. This counts as one subscribed message.
When message TPS is calculated, the number of messages is multiplied by a factor based on the QoS level. For more information about the factors, see Pricing factors.
For example, if a client is set to QoS=2 and cleanSession=true, the pricing factor is 5. If the client produces 10 messages, the number of produced messages is calculated as 10 × 5 = 50.
Example
Assume that there are five topics. A producer sends 20 messages to each topic. One hundred clients subscribe to each topic. All clients use the same QoS level, and the pricing factor is 2.
The total number of messages sent and received is calculated as follows: (Number of topics × Number of messages + Number of topics × Number of messages × Number of client subscriptions) × Pricing factor = (5 × 20 + 5 × 20 × 100) × 2 = 20,200 messages
Unit price
Instance type | Maximum message TPS (messages/second) | Price (USD/month) |
Basic Edition instance | 1,000 | 284 |
5,000 | 1417 | |
10,000 | 2,833 | |
20,000 | 5665 | |
Platinum Edition instance | 20,000 | 5211 |
50,000 | 7,930 | |
100,000 | 12,009 | |
200,000 | 18125 | |
500,000 | 42,368 |
Maximum subscription relationships
Billable item details
Subscription relationships refer to the number of subscriptions that are registered and retained on a specific instance.
Ensure that the maximum number of subscription relationships you purchase exceeds the number required by your services. This prevents throttling when the limit is exceeded, which can cause some message operations to fail.
If some of your clients are no longer in use and their subscription relationships do not need to be retained, you can purge the subscription relationships promptly to save system resources. For more information, see Purge subscription relationships.
Calculation rules
The number of subscription relationships is measured over a 1-minute statistical period. The system samples the number once per second and uses the maximum value from the 60 samples.
For example, within one minute, if the number of subscription relationships is 30 in the first second, 20 in the second second, and so on, up to 50 in the 60th second, the number of subscription relationships for that minute is 50.
A subscription relationship is counted for each topic to which a client (Client ID) subscribes in ApsaraMQ for MQTT. This count is independent of message sending scenarios.
Subscriptions from the same client to a parent topic and its child topics are counted as separate subscription relationships.
For example, if Client_1 subscribes to TopicA, TopicA/sub_1, and TopicA/sub_2, this counts as three subscription relationships.
According to the Message Queuing Telemetry Transport (MQTT) protocol, if a client sets cleanSession=true, the server-side cleans up all topic subscriptions for that client after the client goes offline. If cleanSession=false, the server-side retains the client's topic subscriptions, and they continue to be counted as subscription relationships.
Example
Instance_A has three topics: TopicA, TopicB, and TopicC. Ten clients are connected to the server-side.
Each of the 10 clients produces messages to TopicA, TopicB, and TopicC. Each client subscribes only to TopicA and TopicB to consume messages.
In this scenario, the number of subscription relationships is 10 × 2 = 20.
Unit price
Instance type | Maximum subscription relationships | Price (USD/month) |
Basic Edition instance | 1,000 | 12 |
10,000 | 114 | |
50,000 | 567 | |
100,000 | 1,133 | |
200,000 | 2,266 | |
500,000 | 5,665 | |
1,000,000 | 11,329 | |
Platinum Edition instance | 100,000 | 1,586 |
500,000 | 7477 | |
1,000,000 | 15,180 | |
2,000,000 | 30133 | |
5,000,000 | 75,446 |