All Products
Search
Document Center

ApsaraMQ for RabbitMQ:Billing of serverless instances

Last Updated:Dec 06, 2024

Serverless ApsaraMQ for RabbitMQ instances can be metered based on the pay-by-provisioned-capacity-and-elastic-traffic and pay-by-messaging-request metering methods. The pay-by-provisioned-capacity-and-elastic-traffic metering method requires you to specify the provisioned capacity when you purchase an instance. The pay-by-messaging-request metering method allows you to use resources without provision. You can select a metering method based on your business requirements. This topic describes the billable items and billing rules of serverless ApsaraMQ for RabbitMQ instances.

Supported regions

Pay-as-you-go instances are available only in specific regions. For more information, see Supported regions.

Billable items

Serverless ApsaraMQ for RabbitMQ instances are billed on an hourly basis, regardless of whether the pay-by-provisioned-capacity-and-elastic-traffic or pay-by-messaging-request metering method is used. The following figure describes the billable items:

image

For information about the unit prices and billing formula of each billable item, see the following sections. You can also use the following price calculator to estimate your fees:

Price calculator for serverless ApsaraMQ for RabbitMQ instances

Rules for calculating numbers related to the messaging feature

The following rules can be used to calculate numbers in all billable items related to the messaging feature, including the number of messaging requests, provisioned capacity, and elastic traffic.

Number of messaging requests = Number of requests for receiving messages + Number of requests for delivering messages

  • Number of requests for receiving messages: the number of requests initiated to receive messages in queues. For example, if a message that is received by an exchange is routed to three queues, three requests are counted to receive the message.

  • Number of requests for delivering messages: the number of requests initiated to deliver messages. Each time a message is delivered, a request is counted, regardless of whether the message is processed or whether an acknowledgment (ACK) is returned for the message.

  • Payload size: When you calculate the number of requests initiated to deliver a message, you must use a payload multiplier that is calculated based on a message size of 4 KB. If the size of a message is not divisible by 4, the value is rounded up to the next smallest integer. For example, if you deliver a message whose size is 18 KB, the number of requests initiated to deliver the message is 5. The number of API calls is calculated by using the following formula: ⌈18/4⌉ = 5.

    Note

    ⌈ ⌉ indicates that the value is rounded up to the next smallest integer.

Messaging requests

If you use the pay-by-messaging-request metering method for a serverless ApsaraMQ for RabbitMQ instance, you are charged messaging fees based on the total number of messaging requests.

Billing formula

Messaging fees per hour = Total number of messaging requests × Unit price of messaging requests (USD per request)

Unit prices

Type

Unit price by region (USD per 1 million requests)

Regions other than SAU (Riyadh - Partner Region)

SAU (Riyadh - Partner Region)

Receipt and delivery of normal messages

0.31

0.372

Receipt of delayed messages

1.55

1.86

Delivery of delayed messages

0.31

0.372

Billing example

The following items describe the number of requests initiated to receive and deliver messages in an instance that resides in the China (Hangzhou) region in a specific hour:

  • Seven million requests are initiated to receive normal messages and 2 million requests are initiated to receive delayed messages on the broker. The size of each message is 8 KB.

  • Eight million requests are initiated to deliver normal messages and 3.2 million requests are initiated to deliver delayed messages on the broker. The size of each message is 8 KB.

In this case, the messaging fee of the instance for the hour is USD 17.484. The fee is calculated by using the following formula: (7 + 8) × ⌈8/4⌉ × 0.31 + 2 × ⌈8/4⌉ × 1.55 + 3.2 × ⌈8/4⌉ × 0.31 = 17.484.

Provisioned capacity

If you use the pay-by-provisioned-capacity-and-elastic-traffic metering method for a serverless ApsaraMQ for RabbitMQ instance, messaging fees include fees for provisioned capacity and elastic traffic. You are charged the provisioned capacity fees based on the provisioned capacity and usage duration.

Billing formula

Provisioned capacity fee per hour = Provisioned capacity × Unit price of provisioned capacity (USD per TPS-hour)

Unit prices

Region

Unit price (USD per TPS-hour)

Regions other than SAU (Riyadh - Partner Region)

0.00013

SAU (Riyadh - Partner Region)

0.000156

Billing example

You purchase a serverless ApsaraMQ for RabbitMQ instance that uses the pay-by-provisioned-capacity-and-elastic-traffic metering method and has a provisioned capacity of 3,000 TPS in the China (Hangzhou) region. The provisioned capacity fee per hour is USD 0.39. The fee is calculated by using the following formula: 3,000 × 0.00013 = 0.39. The provisioned capacity fee per month (30 days) is USD 280.8. The fee is calculated by using the following formula: 0.39 × 24 × 30 = 280.8.

Elastic traffic

If you use the pay-by-provisioned-capacity-and-elastic-traffic metering method for a serverless ApsaraMQ for RabbitMQ instance, you are charged elastic traffic fees for the traffic that exceeds the provisioned capacity.

Billing formula

In the preceding formula, Ti indicates the ith minute of the hour. For example, T1 indicates the first minute of the hour and T60 indicates the 60th minute of the hour. indicates the total amount of elastic traffic used during the hour.

Unit prices

Region

Unit price (USD per TPS-minute)

Regions other than SAU (Riyadh - Partner Region)

0.000019

SAU (Riyadh - Partner Region)

0.000022

Billing example

You purchase a serverless ApsaraMQ for RabbitMQ instance that uses the pay-by-provisioned-capacity-and-elastic-traffic metering method and has a provisioned capacity of 5,000 TPS in the China (Hangzhou) region. The following table describes the traffic usage of the instance per minute within a specific hour.

Item

00:00:00

00:01:00

00:02:00

00:03:00

......

00:58:00

00:59:00

Actual peak TPS

5,200

5,300

4,000

4,500

< 5,000

4,800

5,100

Elastic TPS

200

300

0

0

0

0

100

The elastic traffic fee of the instance in this hour is USD 0.0114. The fee is calculated by using the following formula: (1 × 200 + 1 × 300 + 1 × 100) × 0.000019 = 0.0114.

Queues

You are charged queue fees for queues on a serverless ApsaraMQ for RabbitMQ instance based on the number of queues.

Billing formula

Queue fees per hour = Number of queues created on the instance × Unit price of queues (USD per queue)

The system counts the largest number of queues created on an instance in an hour when calculating the queue fees of the instance.

For example, you created 300 queues on an instance and then deleted 100 queues from the instance in a specific hour. In this case, 300 queues are counted when the system calculates the queue fees.

Unit prices

The unit prices of queues are calculated based on a tiered pricing policy.

Billing tier

Unit price (USD per queue-hour)

[0,200]

0.000044

[201,3000]

0.000022

[3001,20000]

0.000044

[20001,100000]

0.000088

Billing example

The following table describes the number of queues created on an instance in 2 hours on a specific day.

Item

Number

Billed quantity

Unit price

Total fee

First hour

You created 150 queues and then deleted 50 queues.

150

A total of 150 queues fall in the [0,200] tier. The unit price is USD 0.000044 per queue-hour.

The queue fee for the hour is USD 0.0066. The fee is calculated by using the following formula: 150 × 0.000044 = 0.0066.

Second hour

You created additional 500 queues.

600

  • A total of 200 queues fall in the [0,200] tier. The unit price is USD 0.000044 per queue-hour.

  • A total of 400 queues fall in the [201,3000] tier. The unit price is USD 0.000022 per queue-hour.

The queue fee for the hour is USD 0.0176. The fee is calculated by using the following formula: 200 × 0.000044 + 400 × 0.000022 = 0.0176.

Message storage space

You are charged storage fees for a serverless ApsaraMQ for RabbitMQ instance based on the storage space that messages occupy and the storage duration of messages on the broker.

Billing formula

Storage fees per hour = Storage space (GB) × Unit price of storage (USD per GB)

Unit prices

Region

Unit price (USD per GB-hour)

Regions other than SAU (Riyadh - Partner Region)

0.000319

SAU (Riyadh - Partner Region)

0.0003828

Outbound Internet traffic

You are charged only for outbound Internet traffic in a serverless ApsaraMQ for RabbitMQ instance.

If the Internet access feature is disabled, you are not charged Internet traffic fees.

Billing formula

Internet traffic fees per hour = Total amount of outbound Internet traffic (GB) × Unit price of Internet traffic (USD per GB)

Unit prices

Region

Unit price (USD per GB)

Regions other than SAU (Riyadh - Partner Region)

0.13

SAU (Riyadh - Partner Region)

0.156

Message traces

After you enable the message trace feature for a serverless ApsaraMQ for RabbitMQ instance, you are charged for the feature based on the number of logs that are generated for message traces.

If the message trace feature is disabled, no fees are generated.

Billing formula

Message trace fees per hour = Number of logs generated for message traces × Unit price of message traces (USD per message trace)

Rules for calculating API calls to different operations

If you call the following API operations during messaging, logs are generated for message traces, regardless of whether the API calls are successful. You are charged for the logs.

  • BasicAck

  • BasicConsume

  • BasicGet

  • BasicNAck

  • BasicReject

  • SendMessage

  • PushMessage

Unit prices

Region

Unit price (USD per million message traces)

Regions other than SAU (Riyadh - Partner Region)

0.0155

SAU (Riyadh - Partner Region)

0.0186

References

  • For information about how to create serverless ApsaraMQ for RabbitMQ instances, see Manage instances.

  • If you no longer require a serverless ApsaraMQ for RabbitMQ instance, you can unsubscribe from the instance. For more information, see Unsubscribe from instances.

  • ApsaraMQ for RabbitMQ also supports the subscription billing method. For information about the billable items of subscription instances, see Billing of subscription instances.