You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(api): cache /api/observers/metrics/summary server-side (0.9 s warm, 2.7–4 s cold; now used by three views) #506
GET /api/observers/metrics/summary?window=1h takes about 0.9 s warm and 2.7–4 s cold on staging, and about 2.8–3.2 s cold on production. Since #481 and #498 it is used by:
the observer list;
the RF Health tiles;
the observer detail page (which no longer blocks on it).
Proposal:
Add a short server-side cache (for example 30 s, keyed by window) with singleflight, so concurrent misses do not stampede.
Keep the cache bounded and read-only.
Optionally use stale-while-revalidate.
Measure cold and warm latency before and after on staging.
Fixed by #512 (merged as cff464636dbfac5ab82289e2bf185ed5c15ca1f2).Fixed by #512: /api/observers/metrics/summary is cached server-side with bounded keys and singleflight (APPROVE with nits, CI green).
Activity
dborup commentedon Oct 20, 2026
Fixed by #512 (merged as
cff464636dbfac5ab82289e2bf185ed5c15ca1f2).Fixed by #512: /api/observers/metrics/summary is cached server-side with bounded keys and singleflight (APPROVE with nits, CI green).