- The
stream_popcatalog in Postgres — the registry of PoPs: code, city, coordinates, role (originoredge) and the PoP’s public relay URL. - The streams viewer mesh in Redis — the hash the geo-router reads to send a viewer to a relay (region → relay URL). The screen matches each PoP’s relay URL against it to show which regions route to that PoP.
- The
relay_heartbeattable in ClickHouse — one row per relay shard per second, which is what tells the screen a PoP is alive right now and how many QUIC sessions and MoQ tracks it holds. - The
stream_pop_cache_1m_qrollup in ClickHouse, which supplies the last hour of cache-hit and viewer numbers.
How a PoP is registered
PoPs are not created from the console. There is no “add PoP” action on this screen. A row appears in thestream_pop catalog when the platform
operator registers a relay deployment with
server/scripts/register-stream-pops.ts from the fleet inventory; the
console only reads that catalog. Each row carries a role: exactly one
PoP is the origin (publishers ingest there and every edge chains to it)
and the rest are edge PoPs (leaves that pull from the origin and serve
viewers from their cache).
That is why the empty state reads:
No PoPs registered yet — PoPs appear when the relay deploy registers them.An empty mesh is therefore a deployment fact, not a telemetry failure. If you expect PoPs and see none, the question to ask is whether the relay deploy in that environment came up and registered, not whether the analytics pipeline is healthy. The catalog also supplies each PoP’s coordinates (
geo_lat, geo_lon),
which is what places the pins on the Edge relay map — an
equirectangular world map, so a PoP registered with real coordinates lands
where it is. The larger pin is the origin; the dashed lines are the
fan-out chains from the origin to each edge. Pin position is catalog data;
the colour of a pin is the PoP’s liveness (see
PoP statuses).
Fields on each PoP row
The response also carries a top-level
telemetry_ok flag. See
When telemetry is unavailable.
What the cache-hit ratio counts
hit_ratio is a per-PoP number computed by the ClickHouse rollup and read
verbatim by the console — the screen does not recompute it. It is the
edge-cache hit share for that PoP, labelled origin offload on the KPI
card: the higher the number, the more of the fan-out that relay absorbed
locally instead of forwarding upstream to origin.
The window is the last hour, assembled from the one-minute buckets in
stream_pop_cache_1m_q. It is not an instantaneous reading. A PoP that
recovered two minutes ago still carries the previous fifty-eight minutes
of misses in its bar.
The Edge cache hit KPI at the top of the screen is the plain
arithmetic mean of hit_ratio across every PoP that served any traffic
in the window. It is not weighted by viewers, and it does not exclude
PoPs in maintenance; PoPs with no traffic at all are left out rather than
counted as 0%. A small PoP with a bad ratio moves the headline number
exactly as much as your largest one does, so treat the KPI as a mesh-wide
smoke alarm and the per-PoP bars as the actual diagnosis.
The KPI card and the per-PoP bars use different colour cut-points, which
is worth knowing before you reconcile them:
So a PoP can sit in warn on its bar while the mesh average it feeds is
still green. That is expected, not a bug.
Reading the fan-out ratio
The Origin → edge fan-out panel shows the chain every viewer’s bytes travel: the origin’s relay host on the left, the number of edges and the summed viewer count on the right, then one row per PoP. The origin publishes once and each edge multiplies it — that is the number that justifies the relay mesh, and the fan-out for one edge is simply its viewer count in the Points of presence table. Each row in the panel carries the PoP’s liveness pip and the viewer regions routed to it. Those regions come from the streams viewer mesh in Redis (region → relay URL), matched against the PoP’srelay_url; the
origin shows ingest because publishers, not the geo-router, send traffic
there. An edge with no region is registered and may be live, but the
geo-router is not sending it any viewers — a note under the list names
such edges. Repointing a region is an ops change to the mesh, not
something this screen does.
Two caveats when you quote per-PoP viewer counts:
- They are last-5-minute peaks from the rollup, so they lag the live session counts in the heartbeat by up to a minute.
- They are attributed by the
pop_codethe relay stamps on its samples. A relay started without--set relay_pop=<code>reports the defaultedge, and its samples do not join to any catalog row.
PoP statuses and what they mean for viewers
Two things combine into the pin colour on the map, the pip in the fan-out list and the Liveness cell: the catalogstatus, and whether the PoP
has sent a relay heartbeat recently. A relay emits one heartbeat per shard
per second; the screen treats anything older than 60 seconds as stale.
The Reporting KPI is the number of live PoPs out of the total. When it
is short, read the Liveness cell of each PoP to tell a stale one (something
broke) from one that has never reported (nothing to fix on the relay). A
PoP in
decommissioned status is not returned at all.
Live relay counters versus the rollup
The screen deliberately stacks two sources of truth, in this order:- Relay health (the
RelayHealthpanel, scoped to thestreamnamespace) — a direct scrape of the relay’s own counters, read now. - The PoP KPIs and bars — ClickHouse rollups, which lag behind by about a minute because they are assembled from one-minute buckets.
Delivery counters
Under the relay health numbers, a second row counts the ways the relay loses or delays media. Before these counters, a viewer could miss objects and no other number on the screen changed. The row is relay-wide: it counts every namespace, not only your streams.
The same counters are on the engine’s Prometheus endpoint as
moqt_pub_subgroup_reset_total{reason}, moqt_pub_open_refused_total,
moqt_pub_publish_done_total{status}, moqt_pub_pending_dropped_total,
moqt_sub_stream_dropped_total{reason} and the
moqt_object_ack_latency_microseconds histogram.
Live tracks on the relay
The Live tracks on the relay panel lists every track of your live inputs that the relay holds now, refreshed every 5 seconds. It readstrpc.observability.relayTracks.useQuery({ orgId }), which returns only
tracks under stream/<your org id>/.
A query that matches more tracks than its limit returns an error, not a
shortened list, so the panel never shows part of your tracks as if it
were all of them.
When telemetry is unavailable
ThepopHealth response carries telemetry_ok. When the ClickHouse side
of the join is unavailable, the catalog still returns PoPs but the
cache-hit numbers cannot be trusted. The screen degrades rather than
showing zeros:
- The Edge cache hit, Reporting, Live sessions and Viewers
KPIs render
—, drop their severity colour entirely, and the cache-hit hint readstelemetry unavailable. - Every per-PoP Liveness, Sessions, Tracks, Viewers and cache-hit value in
the PoP table renders
—. The heartbeat lives in ClickHouse too, so a PoP cannot be called live or stale while ClickHouse is unreachable. - The Telemetry health banner at the top of the page explains the degraded state.
0.0% would claim
that every edge is missing cache, which is a different and far more
alarming statement than “we cannot currently measure it”. Alarm colour on
this screen is reserved for conditions that are genuinely wrong.
The same suppression applies when the mesh is simply empty. With zero
PoPs, the KPI shows — with the hint no traffic yet rather than a red
0.0%. No PoPs means no measurement, not a total cache miss.
Note that the per-PoP bars still draw at their last-read widths while
telemetry_ok is false; only the numeric labels blank out. Read the —
values, not the bar lengths, when the banner is up.
The PoPs KPI, the map pins and the viewer regions are not
suppressed by telemetry_ok: they come from the Postgres catalog and the
Redis mesh, which are separate from ClickHouse. Pins fall back to grey
(not reporting) while the heartbeat cannot be read.
Diagnosing one unhealthy region
When a single PoP’s bar is amber or red while the rest of the mesh is green, work through the panels in this order:- Check the status pip first. If the PoP is in
maintenance, its cache-hit number is expected to sag and needs no action — it is being drained on purpose, and it is still dragging the unweighted mesh average down. If the pip is red with no legend entry, the catalog state itself is the problem. - Check the telemetry banner. A degraded rollup makes every number on the page provisional. Resolve that before you chase a region.
- Compare against the live relay health panel. The bar covers the last hour. If the live counters look normal, you are most likely looking at the tail of an incident that has already ended, and the bar will recover as the older one-minute buckets age out of the window.
- Read that PoP’s viewer count in the fan-out panel. A low hit ratio on a PoP with very few viewers has little effect on origin load, however red the bar looks; a low ratio on the PoP carrying most of the audience is where origin egress is actually going.
- Re-check the mesh average. If exactly one PoP moved and the Edge cache hit KPI changed noticeably, that is the unweighted mean at work — a reminder that the KPI is a signal to open the per-PoP panel, not a measure of how much origin traffic you are actually paying for.
Related
- Telemetry — the metric, trace, and rollup streams behind these numbers
- Architecture — where the relay mesh sits in the data plane
- Authentication — relay tokens and the
namespace_authhook that gates edge subscribe