Repository navigation
net-gateway: time reserved DNS upstream connects - #898
Draft
nikhilbirmiwal-pplx wants to merge 1 commit into
Draft
nikhilbirmiwal-pplx wants to merge 1 commit into
nikhilbirmiwal-pplx wants to merge 1 commit into
Conversation
Log connect_ms and established_before on reserved DNS upstream connection failures, and log the first established connection per upstream once per gateway process with its connect_ms. Together they place the gateway's first upstream dial against the node's per-pod egress policy timeline, so a dial that started while pod egress was isolated is distinguishable from an upstream that accepted the connection and never answered.
This branch has not been deployed
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.
Why
During sandbox startup, the node's NetworkPolicy agent can switch a pod's egress to "policies applied" before the rule that allows internet egress is programmed. A DNS-over-TLS dial made in that window gets no SYN-ACK, RST or ICMP. Hickory reports it as a plain
Timeout, which looks the same as an upstream that connected and never answered.We need to know whether the gateway starts upstream DNS work inside that window. A companion change to the node agent emits per-pod
egress_probe_isolated/egress_probe_allowedevents. This PR adds the gateway side of the join.What
reserved DNS upstream connection failednow carries:connect_ms: time from the start of the dial to the failure.established_before: false until a connection to that upstream has succeeded in this gateway process.reserved DNS upstream first connection established. It's logged once per upstream per gateway process, withconnect_ms. Its timestamp minusconnect_msis when the gateway first dialed that upstream.docs/observability.md§ Reserved DNS upstream connections.Behavior is unchanged: there are no new retries or timeouts. Info volume is at most one line per upstream per gateway process. Idle reconnects don't log the info event.
Testing
cargo checkandcargo clippy --tests -D warningsonpplx-space-net-gatewaycargo test -p pplx-space-net-gateway --lib reserved_dns: 24 passed