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
prober: mesh_dns-tier probes cost ~180 ms at the median (liveness tier 9 ms, resolver server-side p50 1 ms) — ~170 ms of fixed client-side cost per probe, same on both DNS targets #735
mesh-dns resolver, server side (aether_mesh_dns_query_duration_seconds)
1.0 ms
56 ms
—
Both DNS targets cost the same although one is answered authoritatively by the node-local resolver (1 ms) and the other is forwarded to kube-dns, and NO mesh_dns probe completes in under 10 ms while the liveness probe's median is 9 ms. So ~170 ms per probe is a fixed client-side cost that is not the DNS server and is not the HTTP hop the liveness tier exercises.
Candidates (in the order I would test them)
Go resolver A+AAAA behaviour. Go issues A and AAAA in parallel and waits for both; if the AAAA for these names is answered slowly (forwarded upstream? NoData vs NXDOMAIN?) or the resolver retries once, the wait is bounded by the AAAA path, not the A. With attempts:3 timeout:1 (fix(agent): bound the DNS retransmit budget and stop hiding resolution stalls as timeouts (#726) #728) a lost AAAA would cost ~1 s, not 170 ms, so this would have to be a slow-but-answered AAAA. Test: dig A vs dig AAAA vs getent ahosts timings from a pod in aether-test (a one-shot Job whose logs are readable; kubectl exec is denied here).
The mesh_dns tier's HTTP client dials a fresh connection per probe (to force resolution) while the liveness tier reuses one; a new downstream connection through the node proxy may pay on-demand cluster lookup / a new upstream connection with the mTLS handshake to echo's node proxy. Test: curl -w '%{time_namelookup} %{time_connect} %{time_starttransfer}' against both targets from the same Job, and the proxy's access-log duration vs upstream_service_time for the prober's requests (_stream:{service.name="aether-proxy"}, dotted fields).
Search-list expansion.ndots:2 with 3- and 4-dot names should try the absolute name first; verify no extra queries with the dig +search trace and the resolver's aether_mesh_dns_queries_total{result} split during a burst of probes.
Why it matters
The mesh_dns tier IS the availability SLI's happy path; a 20× latency floor over the same HTTP hop is either a prober artefact (then the SLI's timeout budget of 2 s is closer to the floor than intended) or a real per-connection cost every DNS-resolving client in the mesh pays. Either way it was invisible until #733 and should be attributed before the next soak grades latency.
Refs #733 (buckets), #728 (resolver options), #726 (the roll hole), #674 (forward pool).
Phase 1 — attributed. It is not DNS, and it is not one thing: ~150 ms is the prober being CFS-throttled, ~29 ms is a real per-connection mesh cost.
Measured 2026-09-06 15:45–16:00Z on talos-main (rev206, prober pods ~1 h old), from four independent vantage points: the prober's own histogram, the source/destination Envoy access logs, a one-shot nicolaka/netshoot Job in aether-test labelled aether.io/managed with the prober's config.aether.io/upstreams annotation (same node, main-worker-01, since deleted), and the kubelet cAdvisor endpoint.
Attribution table (medians)
layer
measured
how
mesh-dns resolver, server side, mesh name A
0 ms (3 ms worst of 20)
dig +stats A echo.aether-test.aether.internal ×20 from the Job
mesh-dns resolver, server side, mesh name AAAA
0 ms, flags: qr aa, ANSWER: 0
×20 — already an authoritative NODATA, RFC 4074 §4.2 behaviour is correct, never forwarded
kube-dns forward path (svc.cluster.local, A and AAAA)
0–3 ms (one 7 ms)
×20 each
full client-side resolution
0 ms
getent ahosts ×10 on each name
fresh TCP connect + HTTP to the local egress listener (/-/-/livedirect_response, no DNS, no upstream)
1.8 ms (p90 2.8)
curl ×20
warm-connection version of the same
0.9 ms
curl, one connection
the mesh hop, as the source proxy itself times it
29 ms (p90 42, p99 62); upstream_service_time 27 ms
access log, reporter:"source", n=24,129, last 15 min
101 ms (mesh name) / 41 ms (kube name), heavy tail
curl ×20 each, on a node under load
the prober's own number
179 ms (mesh) / 196 ms (kube)
aether_probe_request_duration_seconds, [10m]
Source-proxy duration is 29 ms for both DNS targets (mesh 29, kube 29, n=24k/22k) and 28–30 ms on all five nodes. So the two targets cost the same because DNS was never the cost.
179 − 29 = ~150 ms is spent outside the proxy and outside DNS, i.e. inside the prober process.
Where the 150 ms goes: the prober is CPU-throttled ~85% of the time
charts/prober/values.yaml sets limits.cpu: 50m. kubectl top: 44–48 m on every one of the five pods — pinned at the quota. The kubelet's cAdvisor endpoint (/api/v1/nodes/<node>/proxy/metrics/cadvisor; cAdvisor is not scraped into Prometheus on this cluster, which is why this never showed up):
node
pod
CFS periods
throttled periods
% throttled
throttled seconds (pod life ≈ 4,000 s)
main-worker-01
prober-2w6fx
40,070
34,621
86.4 %
3,916 s
main-worker-02
prober-hvxnx
39,581
35,685
90.2 %
2,285 s
main-worker-03
prober-ffc5r
39,813
32,240
81.0 %
2,882 s
main-worker-04
prober-pc8gf
40,223
32,971
82.0 %
1,055 s
main-worker-05
prober-2c48t
40,477
33,438
82.6 %
1,922 s
A 50 m limit is a 5 ms budget per 100 ms CFS period. Once it is gone the runnable goroutine sleeps to the next period boundary, so probe latency is quantised in ~100 ms steps — which is exactly the distribution in the issue (0 % ≤ 10 ms, 21 % ≤ 100 ms, 73 % ≤ 250 ms) and exactly a median of ~1.75 periods.
This also explains the "control": the liveness tier's 9.05 ms p50 / 317 ms p99 is a local direct_response that an unthrottled curl in the same netns and the same pod network measures at 0.9 ms warm / 1.8 ms fresh. A local reply cannot take 317 ms on any network; that is a scheduler queue. So candidate 2's premise ("the liveness tier is the same hop, cheaper") was wrong in a second way: liveness is also inflated ~10×, just less.
Why the mesh_dns tier is the one that burns the quota
The liveness route is DirectResponseAction{Status: 200} → content-length: 0 → Go's transport sets hasBody=false, hands back http.NoBody and returns the connection to the idle pool immediately. Every liveness probe after the first reuses one connection: no resolve, no dial, ~nothing.
The mesh_dns tier resolves and dials every probe (by design — that is the SLI). Confirmed live rather than assumed: aether_mesh_dns_queries_total shows qtype=a,result=answered at 25.09/s and qtype=aaaa,result=nodata at 25.10/s = 5 probes/s × 5 nodes, one A and one AAAA per probe, so Go really is resolving on each one.
Pyroscope, {k8s_container_name="prober"}, process_cpu, last 30 min:
~39 % of the prober's entire CPU budget is resolve + dial. That is what saturates 50 m, and the throttling it causes then lands on every tier, including liveness.
One real prober defect found alongside it: probe() does resp.Body.Close() without draining, so Go's transport can never return a connection carrying a body to the idle pool. The mesh_dns tier wants a fresh connection, so it is harmless there — but it means the tier's fresh connection is an accident rather than a decision, and the (currently unconfigured) reachability tier, which is documented as reusing the fixed egress, would silently open a new connection per probe too.
The other 29 ms is real, and is the thing the issue's "why it matters" paragraph predicted
connection_pool_per_downstream_connection: true on every node-proxy service cluster (agent/internal/xds/proxy/egress.go:213, NewServiceCluster) — deliberately, so the node proxy never reuses one source pod's upstream connection, and its client certificate, for a different source. Consequence, measured on w01 over 5 minutes:
n = 2028 requests
downstream connections = 1981 (one per probe, as expected)
upstream connections = 1869 (one per probe — no pooling across downstream connections)
So each mesh_dns probe pays a fresh cross-node TCP + mTLS handshake to the destination pod's inbound listener: source upstream_service_time 28 ms against a destination-side total of 3 ms → ~25 ms of handshake + network per new client connection. It is uniform across all clusters (aether-test/echo 29 ms, uds-echo 22 ms, uds-cr-echo 22 ms) and across nodes, including nodes that host an echo replica locally.
This is not a bug and I am not touching the proxy for it — it is the price of the per-source-identity model. But it is worth stating plainly: a mesh client that does not reuse its connections pays a full mTLS handshake per request. Two follow-ups worth their own issues: (a) 25 ms is high for a handshake on a LAN and deserves a look at the destination inbound's accept path; (b) the SLI's happy path is currently a connection-establishment benchmark, so any future latency objective must be stated per-connection, not per-request.
Verdict on the issue's three candidates
Go resolver A+AAAA — ruled out. AAAA of a mesh name is answered locally, authoritatively, as NODATA in 0 ms; the kube name's AAAA forwards and returns in 0–3 ms.
Fresh connection per probe — half right. It is real and now proven (1,869 upstream conns / 2,028 requests), but it costs 29 ms, not 170.
Search-list expansion — ruled out. options ndots:2; both names carry 3 and 4 dots so the absolute name is tried first, and the query counters show exactly one A + one AAAA per probe.
The remaining ~150 ms was none of the three: it is the prober's own 50 m CPU limit. Fix in Phase 2 (chart resources + make the tier's fresh connection deliberate).
charts/prober 0.2.0 → 0.3.0: requests.cpu: 100m, no CPU limit. A limit is a CFS quota, and the workload that publishes the latency SLI must not measure its own scheduling. Rate-bounded and open-loop, so it cannot run away; the memory limit (and therefore GOMEMLIMIT) stays.
prober: the mesh_dns tier gets its own DisableKeepAlives transport so "resolve on every probe" is stated rather than an accident of a body that was never drained; and probe() now drains the body before closing it, after the clock stops, so the keep-alive tiers actually keep alive (the reachability tier was silently connect-per-probe too).
Tests: TestTierClients, TestProbeConnectionReuse (1 connection over 4 probes for a keep-alive tier, 4 for mesh_dns, against a body-answering server — verified to fail with the old bare Close()), TestDrainBody.
The 29 ms mesh hop is not touched. It is connection_pool_per_downstream_connection: true doing what it is there for; 2,028 requests over 5 min on w01 opened 1,869 upstream connections, so ~25 ms of it is a fresh mTLS handshake per client connection. Written up in the PR with two suggested follow-ups.
Expected after deploy: mesh_dns p50 ~30–35 ms (from 179/196), liveness p50 ~1–2 ms (from 9.05), p99 317 ms → low tens, throttled CFS periods 81–90% → ~0%. PromQL in the PR body. Debug Job deleted.
The mesh_dns median is now within ~13 ms of the 29 ms the source proxy measures for the hop — the rest is DNS + a fresh TCP connect + the prober's own scheduling, no longer a 100 ms quantum. The residual real cost is the per-client-connection mTLS handshake (~25 ms) from connection_pool_per_downstream_connection: true, documented above as a deliberate per-source-identity trade; not changed here.
Grading note carried into the soak skill: every pre-0.3.0 prober latency figure (and part of its timeout counts) included the prober's own CFS throttle; compare latency only against post-16:25Z baselines.
Activity
bpalermo commentedon Sep 6, 2026
Phase 1 — attributed. It is not DNS, and it is not one thing: ~150 ms is the prober being CFS-throttled, ~29 ms is a real per-connection mesh cost.
Measured 2026-09-06 15:45–16:00Z on talos-main (rev206, prober pods ~1 h old), from four independent vantage points: the prober's own histogram, the source/destination Envoy access logs, a one-shot
nicolaka/netshootJob inaether-testlabelledaether.io/managedwith the prober'sconfig.aether.io/upstreamsannotation (same node,main-worker-01, since deleted), and the kubelet cAdvisor endpoint.Attribution table (medians)
Adig +stats A echo.aether-test.aether.internal×20 from the JobAAAAflags: qr aa,ANSWER: 0svc.cluster.local,AandAAAA)getent ahosts×10 on each name/-/-/livedirect_response, no DNS, no upstream)upstream_service_time27 msreporter:"source", n=24,129, last 15 minupstream_service_time1 ms)reporter:"destination", n=24,121aether_probe_request_duration_seconds,[10m]Source-proxy
durationis 29 ms for both DNS targets (mesh 29, kube 29, n=24k/22k) and 28–30 ms on all five nodes. So the two targets cost the same because DNS was never the cost.179 − 29 = ~150 ms is spent outside the proxy and outside DNS, i.e. inside the prober process.
Where the 150 ms goes: the prober is CPU-throttled ~85% of the time
charts/prober/values.yamlsetslimits.cpu: 50m.kubectl top: 44–48 m on every one of the five pods — pinned at the quota. The kubelet's cAdvisor endpoint (/api/v1/nodes/<node>/proxy/metrics/cadvisor; cAdvisor is not scraped into Prometheus on this cluster, which is why this never showed up):A 50 m limit is a 5 ms budget per 100 ms CFS period. Once it is gone the runnable goroutine sleeps to the next period boundary, so probe latency is quantised in ~100 ms steps — which is exactly the distribution in the issue (0 % ≤ 10 ms, 21 % ≤ 100 ms, 73 % ≤ 250 ms) and exactly a median of ~1.75 periods.
This also explains the "control": the liveness tier's 9.05 ms p50 / 317 ms p99 is a local
direct_responsethat an unthrottled curl in the same netns and the same pod network measures at 0.9 ms warm / 1.8 ms fresh. A local reply cannot take 317 ms on any network; that is a scheduler queue. So candidate 2's premise ("the liveness tier is the same hop, cheaper") was wrong in a second way: liveness is also inflated ~10×, just less.Why the mesh_dns tier is the one that burns the quota
The liveness route is
DirectResponseAction{Status: 200}→content-length: 0→ Go's transport setshasBody=false, hands backhttp.NoBodyand returns the connection to the idle pool immediately. Every liveness probe after the first reuses one connection: no resolve, no dial, ~nothing.The mesh_dns tier resolves and dials every probe (by design — that is the SLI). Confirmed live rather than assumed:
aether_mesh_dns_queries_totalshowsqtype=a,result=answeredat 25.09/s andqtype=aaaa,result=nodataat 25.10/s = 5 probes/s × 5 nodes, one A and one AAAA per probe, so Go really is resolving on each one.Pyroscope,
{k8s_container_name="prober"},process_cpu, last 30 min:net.(*Resolver).tryOneName— 21.45 %http.(*Transport).dialConn— 17.65 % (→net.internetSocket13.90 %,net.(*netFD).dial9.71 %)~39 % of the prober's entire CPU budget is resolve + dial. That is what saturates 50 m, and the throttling it causes then lands on every tier, including liveness.
One real prober defect found alongside it:
probe()doesresp.Body.Close()without draining, so Go's transport can never return a connection carrying a body to the idle pool. The mesh_dns tier wants a fresh connection, so it is harmless there — but it means the tier's fresh connection is an accident rather than a decision, and the (currently unconfigured)reachabilitytier, which is documented as reusing the fixed egress, would silently open a new connection per probe too.The other 29 ms is real, and is the thing the issue's "why it matters" paragraph predicted
connection_pool_per_downstream_connection: trueon every node-proxy service cluster (agent/internal/xds/proxy/egress.go:213,NewServiceCluster) — deliberately, so the node proxy never reuses one source pod's upstream connection, and its client certificate, for a different source. Consequence, measured on w01 over 5 minutes:So each mesh_dns probe pays a fresh cross-node TCP + mTLS handshake to the destination pod's inbound listener: source
upstream_service_time28 ms against a destination-side total of 3 ms → ~25 ms of handshake + network per new client connection. It is uniform across all clusters (aether-test/echo29 ms,uds-echo22 ms,uds-cr-echo22 ms) and across nodes, including nodes that host an echo replica locally.This is not a bug and I am not touching the proxy for it — it is the price of the per-source-identity model. But it is worth stating plainly: a mesh client that does not reuse its connections pays a full mTLS handshake per request. Two follow-ups worth their own issues: (a) 25 ms is high for a handshake on a LAN and deserves a look at the destination inbound's accept path; (b) the SLI's happy path is currently a connection-establishment benchmark, so any future latency objective must be stated per-connection, not per-request.
Verdict on the issue's three candidates
options ndots:2; both names carry 3 and 4 dots so the absolute name is tried first, and the query counters show exactly one A + one AAAA per probe.The remaining ~150 ms was none of the three: it is the prober's own 50 m CPU limit. Fix in Phase 2 (chart resources + make the tier's fresh connection deliberate).
bpalermo commentedon Sep 6, 2026
Phase 2 — PR #738
Fix is two lines of intent:
requests.cpu: 100m, no CPU limit. A limit is a CFS quota, and the workload that publishes the latency SLI must not measure its own scheduling. Rate-bounded and open-loop, so it cannot run away; the memory limit (and therefore GOMEMLIMIT) stays.DisableKeepAlivestransport so "resolve on every probe" is stated rather than an accident of a body that was never drained; andprobe()now drains the body before closing it, after the clock stops, so the keep-alive tiers actually keep alive (the reachability tier was silently connect-per-probe too).Tests:
TestTierClients,TestProbeConnectionReuse(1 connection over 4 probes for a keep-alive tier, 4 for mesh_dns, against a body-answering server — verified to fail with the old bareClose()),TestDrainBody.The 29 ms mesh hop is not touched. It is
connection_pool_per_downstream_connection: truedoing what it is there for; 2,028 requests over 5 min on w01 opened 1,869 upstream connections, so ~25 ms of it is a fresh mTLS handshake per client connection. Written up in the PR with two suggested follow-ups.Expected after deploy: mesh_dns p50 ~30–35 ms (from 179/196), liveness p50 ~1–2 ms (from 9.05), p99 317 ms → low tens, throttled CFS periods 81–90% → ~0%. PromQL in the PR body. Debug Job deleted.
fix(prober): stop the mesh_dns SLI measuring the prober's own CPU quo…
bpalermo commentedon Sep 6, 2026
Validated on talos-main (prober chart 0.3.0-f81a16c deployed 16:25Z 2026-09-06; read at 16:35Z on the new pods,
[5m])kubectl top)The mesh_dns median is now within ~13 ms of the 29 ms the source proxy measures for the hop — the rest is DNS + a fresh TCP connect + the prober's own scheduling, no longer a 100 ms quantum. The residual real cost is the per-client-connection mTLS handshake (~25 ms) from
connection_pool_per_downstream_connection: true, documented above as a deliberate per-source-identity trade; not changed here.Grading note carried into the soak skill: every pre-0.3.0 prober latency figure (and part of its
timeoutcounts) included the prober's own CFS throttle; compare latency only against post-16:25Z baselines.docs: document shipped features found undocumented by the 2026-09-15 …