Unit Cost Analytics
Analyzing Unit Costs with CloudZero
Unit Cost Analytics (also known as Unit Economics) can provide the total cost of a specified metric for the business. This metric can be something like the cost per API call, cost per user, cost per transaction, or any other useful data point for understanding the efficiency and effectiveness of a system.
For example, let's say that Company A knows the total cost of their system is $10,000 on day 1, and $7,500 on day 2. Without any additional information, they may then conclude that day 1 was the costliest day for their business.
However, Company A also has a cost per user metric that indicates that their cost per user was $1.75 on day 1, and $2.25 on day 2. This indicates that the cost to run the business was actually higher on the day with the lowest spend.
In this way, Unit Metrics helped Company A understand that their system was running less efficiently, even when the total cost was deceptively low.
Understanding Unit Cost
Multi-tenant systems provide many cost, architecture, and operational benefits. However, these same benefits come at the expense of granularity. With these more complicated system architectures, it becomes more difficult to breakdown the costs across data points such as daily active users or events.
This visibility, also referred to as unit costs, can provide crucial insights into a system's performance and utilization. With access to this, an organization can empower their teams to more successfully manage and optimize these systems, and in so doing, take control of their related cloud costs.
Organizations that have command over their unit costs have a better command over their gross margins, because these organizations know that a steady or decreasing unit metric trend, even while costs increase, is an indicator of healthy growth.
Unit Cost Implementation
Setup Overview
Unit Costs are calculated as the spend divided by the metric. You will need the following to calculate it:
-
Spend that will drive unit economics This will be the numerator used to calculate unit cost. Will it be all spend data or a subset? Is it just production data? Is it just a certain product?
-
Metric to divide the spend by This is the denominator used to calculate the unit cost. This data is oftentimes found in an observability tool or database query, and typically it is not a dataset simply found in your cloud provider’s bill.
This metric could be something like total active users per day, total API calls per day, etc. While it is suggested to provide a metric at a time granularity of at least daily, hourly will provide the best ability to understand Unit Cost at the lowest level.
The metrics will be transmitted to CloudZero via an API.
Setup Details
-
Identify the spend you wish to breakdown
Using CloudZero, create a view that highlights the spend you wish to break down using one or more filters.
-
Identify a source for your unit cost data stream
Filter your whole organization’s spend specifically to the spend driving your Unit Cost. Take note of the metadata (Dimensions, tags, etc) used in the filter, if any.
-
Format your Unit Cost Data Stream.
The Unit Cost Data Stream needs to be in a specific JSON format before transmitting to the CloudZero API. The data must include a datetime, the filters indicating what spend to target that you identified in Step 1, and the metric value (e.g., total active daily users). You do not need to convert the value. More information on the JSON format can be found on the Unit Metric API documentation.
-
Send data to the CloudZero API
Once your data is prepared, you will need to send it to CloudZero using the Unit Metric API. For more information on using this API, please refer to the Unit Metric API documentation.
-
Review your Unit Cost Report
After the next ingest of your CloudZero billing data, the metric will now be available in the CloudZero Analytics feature as a measure.
👍 Success!
The name of the measure will be derived from the name of the associated Unit Metric stream (i.e., the value you selected for
{metric_name}
in the Unit Metric API path).Once we begin to receive data, your stream will appear on our Telemetry Streams page with a Type of Metric.
-
Automate the transmission of Unit Cost data.
Once you have confirmed the data, it is recommended that you automate the retrieval, formatting and transmission of it to CloudZero. This can be something like a Lambda function that runs hourly or a scheduled query in your observability tool that transmits to CloudZero in the required JSON format.
Updated 11 months ago