jetessays A gift to every explorer.
中文

Sniffgate: Design and Measurement of a Compact TCP/UDP Failover Gateway

by Daozhendong YangAuthor
Authors: Daozhendong Yang
Submitted: 2026-10-25 · ID: 26.0018 · Category: cs.NI · Version 1
Tags: imported, entry-paper · Confidence: proposed · License: All rights reserved

Abstract

Sniffgate is a single-process TCP/UDP failover gateway written in Rust: immutable routing snapshots published through ArcSwap, active probes over either transport, passive ejection on forwarding failures, hot configuration reload, and deadline-based draining. This paper measures the implementation at commit 1793344 (3,215 lines, a 2.88 MiB binary) on Windows 11 loopback, using a harness that kills real backends and records every latency in a JSON artifact. Under an identical fail-stop, detection is 259.69 ms with UDP probes and 1,143.67 ms with TCP probes, because Windows drops SYN packets to closed ports but resets UDP sockets immediately. An open-but-silent listener takes 1,138.34 ms, which is the probe timeout rather than the transport. The first request after a kill reaches the standby in 510.73 ms through connect retry, well before the health plane switches at 1,198.72 ms; after restart, traffic returns in 195.24 ms. A grid over the probe interval and the failure threshold shows that detection is a schedule, not a constant: it is roughly t probe cycles, and across all 24 configurations the client-visible first request stays between 304.01 ms and 327.19 ms. We also report negative results. `probe = none` is implemented as a successful probe, so it clears the passive failure window: six requests each pay about 507.87 ms and no ejection occurs, and with a threshold of one a dead primary is resurrected twice, 57.18 ms and 24.16 ms after the two ejections. Draining is keyed to the union of TCP and UDP roles, so a TCP-only switch leaves the old connection alive beyond 2,203.69 ms, and a zero drain timeout disables draining. A UDP-only failure is invisible to TCP probes: all 100 datagrams are lost over 3,095.63 ms while the node is healthy. Overhead is 1.749x persistent RTT and 0.031x bulk throughput, with 7.57 MB RSS. Six lessons follow.

Download

Author’s validation note: Imported from the author's local archive. UNVERIFIED on jetessays.

Body

Imported entry paper (unverified hypothesis)

This paper was imported into jetessays as an entry paper from the author's local archive (sniffgate). It is not an established result: under jetessays policy every item is an UNVERIFIED HYPOTHESIS unless explicitly verified. The original source files (LaTeX, figures, scripts, measurements) live in the author's local archive and are not hosted here.

Abstract (as submitted)

Sniffgate is a single-process TCP/UDP failover gateway written in Rust: immutable routing snapshots published through ArcSwap, active probes over either transport, passive ejection on forwarding failures, hot configuration reload, and deadline-based draining. This paper measures the implementation at commit 1793344 (3,215 lines, a 2.88 MiB binary) on Windows 11 loopback, using a harness that kills real backends and records every latency in a JSON artifact. Under an identical fail-stop, detection is 259.69 ms with UDP probes and 1,143.67 ms with TCP probes, because Windows drops SYN packets to closed ports but resets UDP sockets immediately. An open-but-silent listener takes 1,138.34 ms, which is the probe timeout rather than the transport. The first request after a kill reaches the standby in 510.73 ms through connect retry, well before the health plane switches at 1,198.72 ms; after restart, traffic returns in 195.24 ms. A grid over the probe interval and the failure threshold shows that detection is a schedule, not a constant: it is roughly t probe cycles, and across all 24 configurations the client-visible first request stays between 304.01 ms and 327.19 ms. We also report negative results. probe = none is implemented as a successful probe, so it clears the passive failure window: six requests each pay about 507.87 ms and no ejection occurs, and with a threshold of one a dead primary is resurrected twice, 57.18 ms and 24.16 ms after the two ejections. Draining is keyed to the union of TCP and UDP roles, so a TCP-only switch leaves the old connection alive beyond 2,203.69 ms, and a zero drain timeout disables draining. A UDP-only failure is invisible to TCP probes: all 100 datagrams are lost over 3,095.63 ms while the node is healthy. Overhead is 1.749x persistent RTT and 0.031x bulk throughput, with 7.57 MB RSS. Six lessons follow.

Note

Imported via the jetessays seed importer. The author chose not to keep an explicit upload record on this site; the work is listed as an entry paper so it can be discovered, discussed, endorsed and relayed.

★ Starred by 0
Found a policy violation? insult, discrimination, academic discrimination, defamation, dangerous instructions

Discussion

Log in to join the discussion

No comments yet. Be the first to discuss this hypothesis.

← back to browse