All Products
Search
Document Center

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

Last Updated:Jan 04, 2024

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

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 fee is required before you can use instances based on the purchased instance specifications and subscription durations.

Monthly

Messaging TPS

Number of subscriptions

Billing formula:

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

Number of connections

Description

The connections in this topic refer to the client connections over TCP on a single instance at a 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 peak number of active connections under normal business conditions. Otherwise, throttling may be triggered, and some clients may fail to connect to the service.

Example

Assume that the number of active connections to Instance_A was 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 price

Instance edition

Connection specification

Price (USD/month)

Basic Edition

1,000

29

5,000

142

10,000

284

20,000

567

50,000

1,417

100,000

2,833

Enterprise Platinum Edition

100,000

3,852

300,000

11,329

500,000

18,805

1,000,000

37,836

2,000,000

75,446

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 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 messaging TPS, include only the messages that are sent and received by using ApsaraMQ for MQTT. Messages that are sent and received by using ApsaraMQ for RocketMQ are not included.

  • 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 broker stores the message as an offline message. The message is retried after a period of time. In this case, the message is counted as a subscription message.

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

    For example, if you set QoS to 2 and cleanSession 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

Assume that an instance contains five topics and each topic is subscribed to by 100 clients whose coefficients are all 2. If the producer sends 20 messages to each topic,

the number of the messages that are sent and received in the instance is 200,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 = 202,00.

Unit price

Instance edition

Messaging TPS specification

Price (USD/month)

Basic Edition

1,000

284

5,000

1,417

10,000

2,833

20,000

5,665

Enterprise Platinum Edition

20,000

5,211

50,000

7,930

100,000

12,009

200,000

18,125

500,000

42,368

Number of subscriptions

Description

The subscriptions in this topic refer to the subscriptions that are registered and retained in a specific instance.

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

We recommend that you delete subscriptions that are no longer required to save system resources. For more information, see Clear subscriptions for a topic.

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 in this 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 both a topic and the subtopics of the topic, the subscriptions to the topic and the subtopics must be calculated separately.

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

  • The Message Queue for MQTT broker maintains topic subscriptions for clients based on the Message Queuing Telemetry Transport (MQTT) protocol. If cleanSession is set to true on a client, the broker clears all topic subscriptions for the client when the client is disconnected. If cleanSession 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 in 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 price

Instance edition

Subscription specification

Price (USD/month)

Basic Edition

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

Enterprise Platinum Edition

100,000

1,586

500,000

7,477

1,000,000

15,180

2,000,000

30,133

5,000,000

75,446