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
feat(pipes): edge-cacheability + TTL control for public read bursts #296
Area: pipes · cache — public-burst cacheability knobs · found via WaveHouse-Stats dogfooding (sizing stats.wavehouse.dev, WaveHouse-Stats#20)
Two related levers for absorbing public pipe-read bursts (e.g. an HN spike → every visitor's reads ride the tunnel to one box). Neither blocks launch — the origin Ristretto cache + singleflight already bound ClickHouse load — but both widen the burst headroom for the public read surface.
Per-pipe (or per-deployment) cache TTL override. Pipe TTL is derived purely from query duration — cache.QueryTimeToTTL(queryDuration) (internal/api/pipes.go:177; clamp min 10s / max 1h at internal/cache/cache.go:37-45, whose own comment says an override "is needed"). Count pipes run in single-digit ms → always the 10s floor; the window can't be widened without making the query slower. Want: pin a hot public pipe to e.g. 60s by policy.
Emit Cache-Control on pipe responses so a CDN can cache them. GET execution already landed (internal/api/router.go:147r.Get("/pipes/{name}", Execute) — the dogfooding doc's "POST-only" note is stale), but the handler sets no Cache-Control (only Content-Type + X-Cache), so every read is cf-cache-status: DYNAMIC and transits edge → tunnel → origin even inside the TTL window. Add an opt-in Cache-Control: public, max-age=<ttl> (query-string params form the cache key naturally) so the edge absorbs public count-pipe reads.
Bumped P3 → P1. Rationale: this is launch-burst resilience for the public demo surface — stats.wavehouse.dev ships with the flip (#149), and under an HN-spike every visitor's pipe read rides the tunnel to one box. The Cache-Control / edge-caching half is the launch-critical facet (lets Cloudflare absorb public count-pipe reads); the per-pipe TTL override can trail it. This supersedes the "neither blocks launch" line in the body above.
🤖 Posted autonomously via /pm-triage with Claude Code
Priority P1 → P2 per the launch-gated rubric (#149): edge-cacheability + TTL control is a real adoption-scaling feature but it isn't a #149 launch precondition (no live blocker — the public read path works today without it), so it lands in P2 ("blocks broader adoption") rather than P1 ("first-alpha quality / explicit launch precondition"). Flagging the change rather than doing it silently — bump back to P1 if you're treating edge-cache as a launch gate for the streaming embed.
Activity
EricAndrechek commentedon Jun 8, 2026
Bumped P3 → P1. Rationale: this is launch-burst resilience for the public demo surface — stats.wavehouse.dev ships with the flip (#149), and under an HN-spike every visitor's pipe read rides the tunnel to one box. The
Cache-Control/ edge-caching half is the launch-critical facet (lets Cloudflare absorb public count-pipe reads); the per-pipe TTL override can trail it. This supersedes the "neither blocks launch" line in the body above.🤖 Posted autonomously via
/pm-triagewith Claude CodeEricAndrechek commentedon Jul 6, 2026
Priority P1 → P2 per the launch-gated rubric (#149): edge-cacheability + TTL control is a real adoption-scaling feature but it isn't a #149 launch precondition (no live blocker — the public read path works today without it), so it lands in P2 ("blocks broader adoption") rather than P1 ("first-alpha quality / explicit launch precondition"). Flagging the change rather than doing it silently — bump back to P1 if you're treating edge-cache as a launch gate for the streaming embed.