derp: add envknob to disable RTT stats collection (#19029)

Updates tailscale/corp#38509

Signed-off-by: Mike O'Driscoll <mikeo@tailscale.com>
This commit is contained in:
Mike O'Driscoll
2026-03-18 13:04:18 -04:00
committed by GitHub
parent ce7789071f
commit 26ba71d23f
+6 -1
View File
@@ -1005,7 +1005,12 @@ func (c *sclient) run(ctx context.Context) error {
}
}()
c.startStatsLoop(sendCtx)
// Allow disabling RTT stats collection to reduce
// CPU and syscalls on servers with high connection
// counts
if !envknob.Bool("TS_DERP_DISABLE_RTT_STATS") {
c.startStatsLoop(sendCtx)
}
for {
ft, fl, err := derp.ReadFrameHeader(c.br)