All Products
Search
Document Center

ApsaraMQ for RocketMQ:Cost allocation rules and best practices

Last Updated:Aug 21, 2024

The tag feature of Alibaba Cloud Resource Management is integrated into ApsaraMQ for RocketMQ to facilitate resource search and aggregation. You can add different tags to instances that are used for different business departments or project teams. Then, when you view bills, you can use the tags to filter and aggregate the bills to quickly implement cost allocation for projects or teams.

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 add 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 add tags based on the business properties, owners, and departments of the resources. In this example, tags are added 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: Add tags to instances

Add 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 add 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 Expenses and Costs console

Note

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

  1. Log on to the Alibaba Cloud Expenses and Costs console.

  2. In the left-side navigation pane, choose Manage Split > 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.