ApsaraMQ for RabbitMQ offers Serverless instances with two metering methods: pay-by-provisioned-capacity-and-elastic-traffic and pay-by-messaging-request. With the former, you select a provisioned capacity at purchase based on your business workload, while the latter is fully elastic and requires no upfront provisioning. Choose the method that best suits your business. This topic describes the billable items and billing rules for Serverless instances.
Supported regions
Serverless instances are available only in specific regions. For more information, see Supported regions.
Billable items
For both the pay-by-provisioned-capacity-and-elastic-traffic and pay-by-messaging-request billing methods, charges accrue hourly. Billing begins when you purchase an instance. The following diagram illustrates the billable items:
The following sections detail the unit prices and billing formulas for each billable item. You can also use the price calculator to estimate costs:
Counting rules for messaging
The following rules apply to all billable items for the messaging feature, including messaging requests, provisioned capacity, and elastic traffic.
Messaging requests = Message receptions + Message deliveries
When reconciling billing logs or bill line items, use the following table to match log field names to the terminology used in this document:
Billing log field | Document terminology | Description |
| Message receptions | Number of messages received by the queue from producers. One message routed to N queues counts as N receptions. |
| Message deliveries | Number of messages delivered from the queue to consumers. Counted once per delivery attempt, regardless of ACK response. |
Message receptions: The number of messages received by a queue. For example, if a message sent to an exchange is routed to three queues, it is counted as three message receptions.
Message deliveries: A message that is successfully delivered is counted as one message delivery, regardless of whether the message is processed successfully or an ACK is returned.
Payload size: Requests are metered in 4 KB chunks based on the message size. A message smaller than 4 KB is counted as one request. For messages larger than 4 KB, the number of requests is calculated using the ceiling function. For example, delivering an 18 KB message counts as 5 requests (⌈18/4⌉ = 5).
Note⌈ ⌉ indicates the ceiling function, which rounds a number up to the next integer.
Messaging requests
For pay-as-you-go serverless instances, fees are based on the total number of messaging requests.
Billing formula
Hourly messaging fee = Total messaging requests × Unit price per request (USD)
Unit prices
Request type | Unit price (USD per million requests) | ||
Regions other than UAE (Dubai) and SAU (Riyadh - Partner Region) | UAE (Dubai) | SAU (Riyadh - Partner Region) | |
Sending and receiving normal messages | 0.31 | 0.62 | 0.372 |
Receipt of delayed messages | 1.55 | 3.1 | 1.86 |
Delivery of delayed messages | 0.31 | 0.62 | 0.372 |
Billing example
Consider a serverless instance in the China (Hangzhou) region. In one hour, the usage is as follows:
The
brokerreceives 7 millionnormal messages fromproducers and 2 milliondelayed messages. Each message is 8 KB.The
brokerdelivers 8 millionnormal messages toconsumers and 3.2 milliondelayed messages. Each message is 8 KB.
Calculate the hourly messaging fee as follows: (7 + 8) × ⌈8/4⌉ × 0.31 + 2 × ⌈8/4⌉ × 1.55 + 3.2 × ⌈8/4⌉ × 0.31 = USD 17.484
Provisioned capacity
When a serverless ApsaraMQ for RabbitMQ instance uses the Provisioned + Elastic billing method, its messaging fees consist of provisioned capacity fees and elastic traffic fees. Provisioned capacity fees depend on the provisioned capacity and the duration of use.
Billing formula
Hourly provisioned capacity fee = Provisioned capacity (TPS) × Unit price of provisioned capacity (USD per TPS-hour)
Unit prices
Region | Unit price (USD per TPS-hour) | |
Shared | Exclusive | |
Regions other than UAE (Dubai) and SAU (Riyadh - Partner Region) | 0.00013 | 0.00021 |
UAE (Dubai) | 0.00026 | 0.00042 |
SAU (Riyadh - Partner Region) | 0.000156 | 0.000252 |
Billing example
For example, consider a serverless ApsaraMQ for RabbitMQ instance in the China (Hangzhou) region. This instance is deployed in shared cluster mode and uses the Provisioned + Elastic billing method. If you provision a capacity of 3,000 TPS, your hourly provisioned capacity charge is 3,000 × 0.00013 = USD 0.39. The total charge for a 30-day month is 0.39 × 24 × 30 = USD 280.8.
Elastic traffic
When a Serverless instance uses the "Provisioned Capacity + Elastic Traffic" billing method, traffic exceeding the provisioned capacity is billed as elastic traffic.
Billing formula
In this formula, T1, T2, ..., Ti, ..., and T60 represent the 1st, 2nd, ..., ith, ..., and 60th minutes of the hour.
Unit prices
Region | Unit price (USD/TPS/minute) | |
Shared | Exclusive | |
Regions other than UAE (Dubai) and SAU (Riyadh - Partner Region) | 0.000019 | 0.000028 |
UAE (Dubai) | 0.000038 | 0.000056 |
SAU (Riyadh - Partner Region) | 0.000022 | 0.0000336 |
Billing example
Assume you have a shared Serverless instance in the China (Hangzhou) region with a provisioned capacity of 5,000 TPS. The instance uses the "Provisioned Capacity + Elastic Traffic" billing method. The following table shows the instance's usage over a one-hour period.
Item | Minute 00 | Minute 01 | Minute 02 | Minute 03 | ... | Minute 58 | Minute 59 |
Actual peak TPS | 5200 | 5300 | 4000 | 4500 | < 5000 | 4800 | 5100 |
Elastic TPS | 200 | 300 | 0 | 0 | 0 | 0 | 100 |
The instance's elastic traffic fee for this hour is (1 × 200 + 1 × 300 + 1 × 100) × 0.000019 = USD 0.0114.
Number of queues
For serverless ApsaraMQ for RabbitMQ instances, fees are based on the number of queues you create.
Billing formula
Hourly queue fee = Number of queues on an instance × Unit price of a queue (USD/queue)
The billed quantity is the peak number of queues on an instance within a specific hour.
For example, if you create 300 queues and then delete 100 queues within one hour, you are charged for 300 queues for that hour.
Unit price
The unit price per queue is tiered based on the total number of queues.
Billing tier | Unit price (USD/queue/hour) | |
Shared | Exclusive | |
[0,200] | 0.000044 | 0 |
[201,3000] | 0.000022 | 0.000022 |
[3001,20000] | 0.000044 | 0.000044 |
[20001,100000] | 0.000088 | 0.000088 |
Billing example
The following example calculates queue fees for an instance over a 2-hour period.
Time | Activity | Actual billed quantity | Unit price | Total fee |
First hour | You create 150 queues and then delete 50. | 150 | The 150 queues fall into the [0,200] tier. The unit price is USD 0.000044/queue/hour. | 150 × 0.000044 = USD 0.0066 |
Second hour | You add another 500 queues. | 100 + 500 = 600 |
| 200 × 0.000044 + 400 × 0.000022 = USD 0.0176 |
Message storage fees
For serverless instances, you are charged for message storage based on the storage size and duration of all messages, including consumed ones, for up to 3 days.
Billing formula
Hourly storage fee = Storage space (GB) × Unit price (USD per GB-hour)
Unit prices
Region | Unit price (USD/GB/hour) |
Regions other than UAE (Dubai) and SAU (Riyadh - Partner Region) | 0.000319 |
UAE (Dubai) | 0.0005742 |
SAU (Riyadh - Partner Region) | 0.0003828 |
Outbound internet traffic
For serverless instances, you are charged only for outbound internet traffic generated when using internet access.
You are not charged for outbound internet traffic if internet access is disabled.
Billing formula
Hourly internet fee = Total outbound internet traffic (GB) × Unit price (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
When you enable the message trace feature, your serverless instances incur charges based on the number of message trace logs generated.
If this feature is disabled, you are not charged.
Billing formula
Hourly message trace fee = Number of message trace logs × Unit price per trace (USD)
Log counting rules
The following API operations generate a billable message trace log. Each generated log incurs a charge, even if the operation fails.
BasicAck
BasicConsume
BasicGet
BasicNAck
BasicReject
SendMessage
PushMessage
Unit prices
Region | Unit price (USD) |
Regions other than Saudi Arabia (Riyadh) | 0.0155 |
Saudi Arabia (Riyadh) | 0.0186 |
Instance fee
The instance fee applies only to pay-as-you-go instances that use a PrivateLink endpoint.
This fee covers PrivateLink instances in two availability zones and includes a free allowance of 1 GB of storage space, 30 queues, and 50,000 messages sent and consumed per hour (all types, such as normal, scheduled, and sequential).
Billing formula
Hourly instance fee = Number of pay-as-you-go instances that use a PrivateLink endpoint × Unit price (USD per instance-hour)
Unit prices
Region | Instance fee (USD/hour) |
Other public cloud regions | 0.02 |
UAE (Dubai) | 0.04 |
Saudi Arabia (Riyadh) | 0.024 |
PrivateLink
When you enable a PrivateLink endpoint, you are charged for accessing ApsaraMQ for RabbitMQ through it. For more information, see PrivateLink endpoint.
FAQ
Q: My Serverless instance has low traffic but high monthly charges, or the provisioned capacity charge seems too high. What should I do?
Serverless instance charges consist of two components:
Actual resource usage fees: Charges based on messaging requests, storage usage, queue count, outbound internet traffic, and message traces (if enabled).
Provisioned capacity fees: Charges based on the provisioned capacity specification (TPS) and usage duration, independent of actual traffic volume. This applies only to instances using the Provisioned Capacity + Elastic billing method.
If your monthly charges are higher than expected, follow these steps to identify the cause:
Log on to Alibaba Cloud Billing Center to view the itemized billing details and identify the billing item with the highest charges.
If the provisioned capacity fee is high, check whether the provisioned capacity specification (TPS) is appropriately sized for your workload. Refer to the Provisioned Capacity and Elastic Traffic sections of this document for the billing rules and use the information to adjust your provisioned capacity specification if needed.
Q: Does the bill support viewing cost details at the individual queue level?
Currently, the bill and the console do not support viewing cost details broken down to the individual queue level.
As an alternative, you can estimate per-queue costs using the following method:
Enable and query Simple Log Service (SLS) to retrieve the
sendCnt(message receptions) andpushCnt(message deliveries) values for each queue.Apply the counting rules described in the Counting Rules for Messaging section — including the 4 KB payload size multiplier (⌈message size / 4 KB⌉) and the applicable unit price — to calculate the estimated cost for each queue.
Q: How can I estimate or compare the testing cost of different Serverless billing modes (pay-by-messaging-request vs. pay-by-provisioned-capacity-and-elastic-traffic)?
On the instance creation page, the estimated price updates in real time in the lower-right corner as you configure the instance. You can enter the purchase page, switch between different billing methods — pay-by-messaging-request, pay-by-provisioned-capacity-and-elastic-traffic, and subscription — and directly compare the estimated costs without confirming the purchase. This lets you evaluate which option is most cost-effective for your testing or production scenario.
Related topics
To create serverless instances, see Instances.
If you no longer need a serverless instance, see Cancel an ApsaraMQ for RabbitMQ instance.
ApsaraMQ for RabbitMQ also supports subscription instances. For details about billable items, see Billing of subscription instances.