Skip to content

Commit 4a6332e

Browse files
perf(tunnel-node): event-driven backpressure, atomic settle, async udpgw DNS
High priority: - #1 Replace reader_task busy-poll (50ms) with drain_notify Notify — reader now wakes only when bytes are consumed, cutting CPU waste under sustained backpressure (fast upstream / slow Apps Script). - #4 Add buf_len / pkt_count atomics so the straggler settle loop reads buffer sizes lock-free (was 10k+ mutex acquisitions per batch). - #7 Make DstAddr::to_socket_addr async, use tokio::net::lookup_host instead of blocking std::net::ToSocketAddrs inside async tasks. Medium priority: - #5 Collect stale sessions under global lock but abort them after releasing it — other handlers aren't blocked during task abort. - #8 Cap udpgw accumulation buffer at 256 KiB; clear on overflow to prevent OOM from repeated corrupt frames. Low priority: - Add sid_short(&str) helper, deduplicate nginx-404 DECOY_404_BODY const, remove redundant drop(packets), suppress dead_code on test-only pub consts.
1 parent b37f7be commit 4a6332e

2 files changed

Lines changed: 138 additions & 72 deletions

File tree

0 commit comments

Comments
 (0)