Skip to content

Commit de37d31

Browse files
authored
[skills] cdn-caching: add write utilization metric (#116)
1 parent d71c61c commit de37d31

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

skills/cdn-caching/SKILL.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,20 @@ vercel metrics vercel.request.count -S <team> -p <project> -a sum --since 24h
169169
vercel metrics vercel.isr_operation.write_units -S <team> -p <project> -a sum --since 24h
170170
```
171171

172+
**Write utilization = cache serves ÷ ISR writes** — cached reads per regeneration.
173+
174+
```bash
175+
# numerator: cache serves — sum the HIT + STALE + PRERENDER buckets
176+
vercel metrics vercel.request.count -S <team> -p <project> \
177+
-f "environment eq 'production' and (cache_result eq 'HIT' or cache_result eq 'STALE')" \
178+
--group-by route -a sum --since 24h
179+
# denominator: ISR writes
180+
vercel metrics vercel.isr_operation.write_units -S <team> -p <project> \
181+
-f "environment eq 'production'" --group-by route -a sum --since 24h
182+
```
183+
184+
High is good; near or below ~1 means you regenerate about as fast as the page is read (wasted writes) → lengthen the revalidate interval or move time-based to on-demand tag revalidation.
185+
172186
**Which routes revalidate most.** Break write units down by `route` and `request_path` to find paths that regenerate often relative to traffic:
173187

174188
```bash

0 commit comments

Comments
 (0)