Repository navigation
obs(#1009): upstream/downstream end timing in the HTTP access log, and the benign-DC grader rule for QUIC twins at hot restart - #1048
Merged
Conversation
…d the benign-DC grader rule for QUIC twins at hot restart The HTTP access log (aether_access_logs) gains two durations anchored at the first upstream response byte: upstream_rx_ms %COMMON_DURATION(US_RX_BEG:US_RX_END:ms)% downstream_tx_end_ms %COMMON_DURATION(US_RX_BEG:DS_TX_END:ms)% "-" means the end point never happened, so a DC line now says whether the upstream FIN had been decoded when the downstream closed. The pinned Envoy (726d7ac) accepts both; //test/envoy_validate parses the formatter (verified red with an invalid precision). e2e/soak/README.md gets the grader rule: a DC line is benign iff it is exactly DC + downstream_remote_disconnect + 200 + the clean-line bytes_sent for that target, with the LogsQL for benign vs non-benign per roll; the runbook points at it. e2e/eastwest-quic-hotrestart.sh is the kind leg (HTTP/1.1 keep-alive loops through supervisor SIGHUP hot restarts to two h3 twins and an h2 control, graded from an OTLP collector stand-in). On single-node kind the race did not reproduce. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
This was referenced Sep 28, 2026
bpalermo
added a commit
that referenced
this pull request
Sep 29, 2026
Brings #979 up to date with 36 commits of main (demand-scoped twins #1020/#1032, fresh-stream classifier #1033/#1035, dormant-pair ledger #1036/#1038, per-twin EDS names #1012/#1029, the twin certificate gate #1051, the ODCDS always-answer override, --east-west-quic-idle-timeout #1063, L4 stat keys #1043, access-log timing #1048, the identity gate #1055, hot-restart knobs #1068 and the carried Envoy patches) while keeping #979's intent: no allow-list, every destination in the node's dependency set is QUIC-eligible. Resolution: - cache: quicServices / SetEastWestQUICServices removed. armsFor gives arms to every default, identity-ready, non-waypointed entry whose service is in the dependency set (the same rule recordQUICPair admits by, so no route names a twin the agent would refuse); twins stay demand-scoped. The destination_not_quic_enabled refusal/prune reason is gone. - quicpairs: the dependency-set prune now waits for the pod set like the source prune does -- the allow-list used to force its destinations into the set, and without it the first snapshot after an agent restart dropped every restored pair (TestQUICDemandPairSurvivesAgentRestart was red). - fan-out log: allow_listed_services dropped; observed_pairs and awaiting_client_cert kept. - chart 1.0.12: eastWestQuicServices removed, eastWestQuicIdleTimeout and its parentShutdownTime check kept. - e2e/eastwest-quic.sh: main's demand-scoped E1/E4c/E6 + #979's QUIC_DNS_SANS negative control; h2only/E3 removed; E6 dials quic-a and its idgate-* pairs are excluded from the driven-pair count. eastwest-quic-hotrestart.sh's h2 control is now the weighted GAMMA split (the one h2-by-design path). - tests, runbook, soak README, configuration.md, 038 rewritten for the unconditional state. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mechanism
Details are in the issue comment, which was read from the pinned Envoy 726d7ac. At a source-proxy hot restart, the draining parent stamps
Connection: closeon the 200. The HTTP/1.1 client (k6) reads the full Content-Length body and closes. The h3 upstream FIN is decoded a moment later, soConnectionManagerImpl::onEvent(RemoteClose)→resetAllStreamsflags the still-open streamDCwithresponse_code_details=downstream_remote_disconnect.This is cosmetic:
bytes_sentequals the clean lines, the client closed the connection itself, and k6 counted every request as a success. h2 does not show it because nghttp2 delivers DATA+END_STREAM from one read. No Envoy config setting ends a stream on a satisfied Content-Length, so the fix is attribution rather than behaviour.Access-log fields (
agent/internal/xds/proxy/accesslog.go)upstream_rx_ms%COMMON_DURATION(US_RX_BEG:US_RX_END:ms)%, ending when the router decoded the upstream end_stream (maybeEndDecode)downstream_tx_end_ms%COMMON_DURATION(US_RX_BEG:DS_TX_END:ms)%, ending when the downstream codec finished encoding (onCodecEncodeComplete)CommonDurationFormatterrenders-whenever either time point is unset. Reading the source, the race shows as both fields-together with a fullbytes_sent, becauseresetAllStreamsdestroys and logs the stream before the FIN is decoded. A clean line has two numbers. A DC line withupstream_rx_msset anddownstream_tx_end_ms-is a different case: the upstream finished, then the response stalled on its way out. It gets attributed separately and is not the race.Grader rule (
e2e/soak/README.md, "BenignDCat a source-proxy hot restart")A
DCline is benign only if all of these hold:response_flagsis exactlyDCresponse_code_detailsisdownstream_remote_disconnectresponse_codeis200bytes_sentequals that target's clean-line body size (791 for svc-1/2 on rev242; read it fresh)Every other
DCis still a failure:downstream_local_disconnect(...), a short body, a non-200, orDCalongside another flag. Benign lines are also left out of the k6 reconciliation. The README includes the LogsQL, and the runbook's east-west QUIC section links to it:Kind proof: harness added, race not reproduced
e2e/eastwest-quic-hotrestart.shreuses thee2e/eastwest-quic.shbring-up. That script now has a source guard and anEWQ_EXTRA_HELM_ARGShook, and its own behaviour is unchanged. The new script adds:client-atoquic-aandquic-b(h3 twins) and toh2only(the h2 control)/opt/aether/supervisor, the same trigger as a watched-config change, and confirmed byrestart_epochIt then grades the collector's records against the rule above.
I did two runs on kind, with 3 and 6 restarts. Excerpt from the 6-restart run:
What these runs show:
-.The race itself did not reproduce on single-node kind: 0 DC in about 100 drain-closed connections per h3 destination across 9 restarts. Here source and destination share one proxy over loopback, and on rev242 the rate was 74 in 8 h of fleet rolls. The leg reports a zero as vacuous, and
HR_REQUIRE_DC=1makes a zero fail. The next QUIC soak is the first place the timing fields will be read on real DC lines.Tests
//agent/internal/xds/proxy:proxy_test:TestBuildAccessLogEnabledpins both formatter strings exactly. Envoy accepts unknown time-point names as custom timing keys, so only the unit test catches a typo in a marker.//test/envoy_validate:envoy_validate_testpasses. It is a live gate: with the precision set tomz, it failsenvoy --mode validateon every bootstrap withInvalid common duration precision: mz.--config=lint --@aspect_rules_lint//lint:fail_on_violation) over//e2e/...,//agent/internal/xds/proxy/...and//test/envoy_validate/...is clean, andmake format-checkis clean.charts/change.Closes #1009
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr