Metering & data
Sum, Count or Peak: Picking the Right Usage Aggregation
By the Orvlin team · · 2 min read
Usage aggregation methods: what to decide
The same raw activity can produce different bills depending on aggregation. That is not just an engineering detail. It changes incentives, customer budgeting and the explanation printed on the invoice.
Count is useful when each event represents one equivalent action. Sum handles variable quantities such as bytes. Distinct count needs stable identity rules. Peak measures the highest observed value, which requires clear sampling and period definitions.
How this works in practice
Three uploads contain 2 GB, 3 GB and 5 GB. Event count is three; total transferred is 10 GB; largest upload is 5 GB. None of those means average storage over the month. A storage charge needs a separate measure of capacity over time.
What can go wrong
An average calculated from irregular samples can be misleading. If a system samples more frequently during heavy activity, an unweighted average may overstate consumption. Preserve timestamps and choose an aggregation appropriate to the contract.
Questions for your team
- State the aggregation beside the unit rate.
- Test an account with only one event.
- Test repeated identities and irregular sampling.
- Make dashboard and invoice definitions identical.
Frequently asked questions
- Is maximum usage the same as total usage?
- No. Maximum captures a peak observation; total usage sums quantities across the period. Choose the one that matches the service being sold.