All Products
Search
Document Center

ApsaraMQ for MQTT:Billing of Basic Edition and Enterprise Platinum Edition instances

Last Updated:Sep 06, 2024

This topic describes the billable items and pricing of ApsaraMQ for MQTT Basic Edition and Enterprise Platinum Edition instances.

Billing overview

ApsaraMQ for MQTT instances can be classified into Basic Edition and Enterprise Platinum Edition. For information about the differences between the editions, see Instance editions.

The billing methods and billable items of Basic Edition instances and Enterprise Platinum Edition instances are the same. The following table describes the billing methods and billable items.

Billable item

Billing method

Billing cycle

Number of connections

Subscription

An upfront payment is required based on the purchased specification and subscription duration before you can use an instance.

Monthly

Messaging TPS

Number of subscriptions

Billing formula:

Instance fees = (Price of the connection specification + Price of the messaging TPS specification + Price of the subscription specification) × Subscription duration (months)

Number of connections

Description

Connections refer to the number of client connections to an instance over TCP at a specific point in time. The number of connections is a transient value. The value is updated every minute.

Make sure that you select a specification that provides more connections than the maximum number of active connections under normal business conditions. Otherwise, throttling may be triggered, and some clients may fail to connect to the service.

Example

The number of active connections to Instance_A is 1,000 at 10:00 and 2,000 at 10:01. To ensure that the service can run as expected, you must purchase a specification that provides more than 2,000 connections. For example, you can purchase a specification that provides 5,000 connections.

Unit prices

Instance edition

Connection specification

Price (USD per month)

Basic Edition

1,000

29

5,000

142

10,000

284

20,000

567

50,000

1417

100,000

2833

Enterprise Platinum Edition

100,000

3852

300,000

11329

500,000

18805

1,000,000

37836

2,000,000

75446

Messaging TPS

Description

Messaging transactions per second (TPS) is the total number of messages produced and consumed per second in a specific instance. Messaging TPS is updated every minute.

Make sure that you select a specification that provides a higher messaging TPS than the peak messaging TPS under normal business conditions. Otherwise, throttling may be triggered, and some messages may fail to be sent or received.

Calculation rules

  • When you calculate the messaging TPS, include only the messages that are sent and received by using ApsaraMQ for MQTT. Do not include messages that are sent and received by using ApsaraMQ for RocketMQ.

  • If the broker fails to push a message for which the QoS parameter is set to 1 and the cleanSession parameter is set to false, the message is stored as an offline message and retried after a period of time. In this case, the message is counted as one subscription message.

  • Take the coefficient into consideration. The coefficient is calculated based on the values of the QoS and cleanSession parameters. For more information, see Calculation coefficients.

    For example, if you set the QoS parameter to 2 and the cleanSession parameter to true on the client, the corresponding coefficient is 5. In this case, if the client produces 10 messages, when you calculate the messaging TPS, the number of produced messages is counted as 50 based on the following formula: 10 × 5 = 50.

Example

An instance contains five topics and each topic is subscribed to by 100 clients whose coefficients are all 2. The producer sends 20 messages to each topic.

The number of messages that are sent and received on the instance is 20,200 based on the following formula: Number of sent and received messages = (Number of topics × Number of messages in each topic + Number of topics × Number of messages in each topic × Number of subscriptions) × Coefficient = (5 × 20 + 5 × 20 × 100) × 2 = 20,200.

Unit prices

Instance edition

Messaging TPS specification

Price (USD per month)

Basic Edition

1,000

284

5,000

1417

10,000

2833

20,000

5665

Enterprise Platinum Edition

20,000

5211

50,000

7930

100,000

12009

200,000

18125

500,000

42368

Number of subscriptions

Description

Subscriptions refer to the subscriptions that are registered and retained on a specific instance.

Make sure that you select a specification that provides more subscriptions than the maximum number of subscriptions under normal business conditions. Otherwise, throttling may be triggered, and some messages may fail to be sent or received.

Calculation rules

  • The system collects one sample every second based on a 1-minute cycle. The maximum value among the 60 samples is used.

    For example, in a 1-minute cycle, the number of subscriptions in the first second is 30, the next second is 20, the third second is 30, and the 60th second is 50. If the maximum value within the 1-minute cycle is 50, the number of subscriptions in the minute is 50.

  • Each subscription to an ApsaraMQ for MQTT topic by a client is counted as one subscription, regardless of the messaging scenario.

  • If a client subscribes to a topic and the subtopics of the topic, the subscriptions to the topic and the subtopics must be separately calculated.

    For example, if Client_1 subscribes to Topic A and subtopics TopicA/sub_1 and TopicA/sub_2, the number of subscriptions is three.

  • ApsaraMQ for MQTT brokers maintain topic subscriptions for clients based on the Message Queuing Telemetry Transport (MQTT) protocol. If the cleanSession parameter is set to true on a client, the broker clears all topic subscriptions for the client when the client is disconnected. If the cleanSession parameter is set to false on a client, the broker retains and calculates all topic subscriptions for the client even if the client is disconnected.

Example

  • Topic A, Topic B, and Topic C are created on Instance_A, and 10 clients are connected to the broker.

  • Each of the 10 clients sends messages to Topic A, Topic B, and Topic C, and each client subscribes to only Topic A and Topic B for message consumption.

In this case, the number of subscriptions is 20 based on the following formula: 10 × 2 = 20.

Unit prices

Instance edition

Subscription specification

Price (USD per month)

Basic Edition

1,000

12

10,000

114

50,000

567

100,000

1133

200,000

2266

500,000

5665

1,000,000

11329

Enterprise Platinum Edition

100,000

1586

500,000

7477

1,000,000

15180

2,000,000

30133

5,000,000

75446