Common calculations
The best way to calculate bytes served by the origin is to use the CacheResponseBytes
field in Cloudflare Logs, and to filter only requests that come from the origin. Make sure to filter out OriginResponseStatus
values 0
and 304
, which indicate a revalidated response.
Bandwidth (or data transfer) can be calculated by adding the EdgeResponseBytes
field in HTTP request logs. There are some types of requests that are not factored into bandwidth calculations. In order to only include relevant requests in calculations, add the filter ClientRequestSource = 'eyeball'
.