If you purchase a subscription or pay-as-you-go ApsaraMQ for RocketMQ instance, the computing specification is a required billable item. The computing specification determines the instance's peak messaging TPS (transactions per second). Computing fees are based on the specification size and subscription duration.
If you create a pay-as-you-go instance, fees are generated based on the computing specification that you select immediately after you purchase the instance, regardless of whether you connect your applications to the instance.
How computing specifications work
A computing specification sets the upper bound on an instance's messaging TPS. Larger specifications support higher peak TPS and may include higher resource quotas for management resources and configuration limits.
For available specifications and their limits, see Instance specifications.
How TPS is calculated
Messaging TPS is the maximum total number of times that an instance can send and receive messages per second. Three factors affect TPS counting: message size, the send-to-receive ratio, and message type.
Message size normalization
TPS is calculated based on a 4 KB message size. Messages smaller than 4 KB count as 4 KB. Messages larger than 4 KB are counted as multiple units.
Example: An instance sends 5,000 messages and receives 5,000 messages per second. Each message body averages 16 KB.
TPS = (message size / 4 KB) x (messages sent + messages received)
= (16 / 4) x (5,000 + 5,000)
= 4 x 10,000
= 40,000Send-to-receive ratio
By default, message sending TPS and message receiving TPS share a 1:1 ratio. To allocate more capacity for reads than writes, adjust this ratio in the ApsaraMQ for RocketMQ console.
Advanced-feature messages (5x multiplier)
Ordered messages, scheduled messages, delayed messages, and transactional messages consume 5x the TPS of normal messages. This 5x multiplier applies to both sending and receiving.
Example: An instance sends 10 transactional messages per second.
TPS = messages sent x multiplier
= 10 x 5
= 50What happens when TPS exceeds the specification limit
Behavior depends on whether elastic TPS is enabled:
| Scenario | Behavior |
|---|---|
| Elastic TPS enabled, excess within elastic limit | Instance runs normally. Excess TPS is billed on a pay-as-you-go basis. |
| Elastic TPS enabled, excess beyond elastic limit | Instance is throttled. |
| Elastic TPS not enabled or not supported | Instance is throttled. |
For elastic TPS billing details, see Elastic TPS fee.
For throttling behavior, see Throttling.
Billing rules
The computing specification selected at purchase determines the computing fee. Both subscription and pay-as-you-go billing methods are supported.
Billing formulas
| Billing method | Formula | Billing cycle |
|---|---|---|
| Pay-as-you-go | Computing fees = service duration (hours) x unit price per hour (USD) | Hourly. Partial hours are rounded up to 1 hour. |
| Subscription | Computing fees = subscription duration (months) x unit price per month (USD) | Monthly |
Pay-as-you-go billing example
Suppose you purchase an instance at 10:30 AM. The first billing cycle covers 10:00 AM to 11:00 AM. Even though the instance ran for only 30 minutes in that cycle, you are billed for the full hour:
First cycle fee = 1 hour x unit price of the specificationAfter each billing cycle ends, a bill is generated and fees are automatically deducted from your Alibaba Cloud account.
Subscription billing
Subscription requires upfront payment for the full duration. The instance is available immediately after payment.
Unit prices
For current pricing, see the buy page.
Billing method comparison
| Pay-as-you-go | Subscription | |
|---|---|---|
| Payment timing | Billed after use, deducted automatically | Pay upfront before use |
| Billing unit | Per hour | Per month |
| When fees start | Immediately after instance creation | At time of purchase |
| Instance availability | Available immediately, no upfront payment | Available after payment |
FAQ
Why am I charged for a pay-as-you-go instance I haven't used?
Pay-as-you-go computing fees for ApsaraMQ for RocketMQ 5.0 instances start as soon as the instance is created. The fee is based on the selected computing specification and how long the instance has been running -- not on actual message traffic. To stop charges, release the instance.