> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tenbyte.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Traffic Served

> Track bandwidth delivered through the CDN, spot trends, and pull totals via API for billing and capacity reports.

Traffic Served measures the bytes the CDN sent to clients in a given window. It drives your bandwidth bill and signals whether traffic patterns are shifting under you.

<Frame caption="Traffic Served Statistics">
  <img src="https://mintcdn.com/vidinfra/ejWP9ITFPl3vu2w-/images/cdn/41.png?fit=max&auto=format&n=ejWP9ITFPl3vu2w-&q=85&s=f9236a2d6cd23c93f1d7652a7a4c0e49" alt="Traffic Served Statistics" width="1632" height="548" data-path="images/cdn/41.png" />
</Frame>

## What it tells you

* Total bytes delivered to end users.
* Period-over-period change (today vs yesterday, week vs week).
* Trend lines that surface launches, viral spikes, and outages.

## How to read the chart

| Element     | Meaning                                                  |
| ----------- | -------------------------------------------------------- |
| Main number | Total bytes (KB / MB / GB / TB) for the selected window. |
| Percentage  | Change vs the prior identical window. Positive = growth. |
| Sparkline   | Distribution over time — find spikes and dips.           |

## Pull via API

```bash theme={null}
curl -sS "https://api.tenbyte.io/cdn/distributions/$DISTRIBUTION_ID/analytics/traffic?from=2026-05-01T00:00:00Z&to=2026-05-09T00:00:00Z&granularity=hour" \
  -H "Authorization: Bearer $TENBYTE_API_TOKEN" | jq
```

Response (truncated):

```json theme={null}
{
  "total_bytes": 1283456789012,
  "series": [
    {"ts": "2026-05-01T00:00:00Z", "bytes": 5012345678},
    {"ts": "2026-05-01T01:00:00Z", "bytes": 5234567890}
  ]
}
```

See the [CDN API reference](/api-reference/cdn) for filters (`granularity`, per-PoP breakdown).

## Common patterns

| Pattern                               | What it usually means                                                                            |
| ------------------------------------- | ------------------------------------------------------------------------------------------------ |
| Steady daytime peaks                  | Healthy — track week-over-week ratio.                                                            |
| Sudden spike with low cache-hit ratio | Origin will feel it. Check [cache hit ratio](/docs/cdn/analytics/cache-hit-ratio) and rule TTLs. |
| Spike with stable hit ratio           | Real traffic growth. Capacity-plan origin.                                                       |
| Sustained drop                        | DNS issue, broken deploy, or upstream redirect bypassing the CDN.                                |

## Cost levers

* **Raise cache hit ratio.** Higher HIT% = same user-facing bytes, less origin egress.
* **Compress text.** Enable Gzip / Brotli in [cache rules](/docs/cdn/distributions/cache-rules).
* **Right-size images.** Use [Image Optimizer](/docs/cdn/distributions/image-optimizer) with `format=auto` and capped widths.
* **Cap query-string variants.** A noisy cache key duplicates the same bytes.

## Operational tips

* **Daily totals to finance.** Pipe API totals into your billing spreadsheet or BI tool.
* **Per-path breakdowns.** Use the path filter to find the top 10 bandwidth consumers; cache or compress them harder.
* **Alert on rate, not total.** A 5× hourly spike is more actionable than absolute totals.
