All Products
Search
Document Center

ApsaraMQ for RocketMQ:Cost allocation rules and best practices

Last Updated:Sep 25, 2023

Alibaba Cloud allows you to use tags and cost centers to allocate the costs of cloud resources to different project teams or business departments. This helps simplify cost management on the cloud. This topic describes the cost allocation rules of ApsaraMQ for RocketMQ and the best practices.

Cost allocation rules

  • Object: The pay-as-you-go bills of ApsaraMQ for RocketMQ 4.0 Standard Edition instances and the subscription bills of ApsaraMQ for RocketMQ 4.0 Enterprise Platinum Edition instances.

  • Granularity: ApsaraMQ for RocketMQ allows you to allocate costs based on instances. You can use different instances to isolate the business of different departments or applications.

  • Mechanism: ApsaraMQ for RocketMQ allows you to allocate costs by managing tags. You need to attach tags to the instances that you want to manage, and then use the tags to filter the instances to check the bill details from different dimensions.

Best practices

Scenarios

Company A uses an Alibaba Cloud account that owns many ApsaraMQ for RocketMQ resources. The finance department of company A wants to allocate costs based on cost centers, departments, and projects.

In this case, you can attach different tags to the instances that are used by different projects. Then, you can use the tags to filter the instances to check the costs of each project and allocate costs.

Step 1: Plan tags

To efficiently manage resources, you can attach tags based on the business properties, owners, and departments of the resources. In this example, tags are attached based on cost centers, departments, and projects. In actual scenarios, you must plan tags based on your business requirements.

Item

Tag in the key:value format

Cost center

  • costcenter:Beijing

  • costcenter:Shanghai

  • costcenter:Hangzhou

Department

  • department:Order

  • department:Shop

  • department:Item

Project

  • project:project A

  • project:project B

Step 2: Attach tags to instances

Attach tags to the specified ApsaraMQ for RocketMQ instances based on the tag plan in Step 1: Plan tags.

For example, if Instance 1 is used by Team A of the order department of the Shanghai cost center, you need to bind the costcenter:Shanghai, department:Order, and project:project A tags to Instance 1.

ApsaraMQ for RocketMQ allows you to attach tags to an instance by using the following methods:

  • Use the ApsaraMQ for RocketMQ console. For more information, see Add a tag.

  • Use the TagResources API operation.

Step 3: View split bills in the User Center

Note

After you attach tags to an instance, the update cycle of split bills is T+1.

  1. Log on to the User Center.

  2. In the left-side navigation pane, choose Cost Allocation > Split Bill.

  3. On the Split Bill page, specify the search conditions to query costs.

    • Example 1: Query the costs of the three cost centers

      In the Instance Tag column of the bill list, select costcenter as the filter condition.

    • Example 2: Query the costs of the order department (department:Order) on Project A (project:project A ).

      In the Instance Tag column of the bill list, choose department > Order and project > project A as the filter conditions.

  4. (Optional) In the upper-right corner of the cost report section, click Export Billing Overview (CSV). Then, export the cost report in the CSV format.