Skip to content

Harden UDP parsing and speed up reactor for 10k conns#32

Merged
treeform merged 9 commits into
masterfrom
net-hard
Jul 14, 2026
Merged

Harden UDP parsing and speed up reactor for 10k conns#32
treeform merged 9 commits into
masterfrom
net-hard

Conversation

@treeform

@treeform treeform commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Harden untrusted UDP receive (length checks, caps, no wire asserts, close(), README honesty).
  • Speed up hot paths: connection Table, receive window, send Deque/part pool, ACK bundling, larger per-tick drain.
  • Add reactor bench with 10k default scale (Istrolid1 peaked ~3k; Istrolid2 headroom). Baseline in docs/bench-baseline.md.
  • DefaultMaxConnections = 10_000.

Test plan

  • nim r tests/tests.nim
  • nim r tests/test_hardening.nim
  • nim r -d:release -d:nettyBench tests/bench_reactor.nim (default 10k)
  • Compare output to docs/bench-baseline.md

treeform and others added 7 commits July 14, 2026 08:03
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@treeform treeform changed the title Harden UDP parsing and connection caps Harden UDP parsing and speed up reactor for 10k conns Jul 14, 2026
treeform and others added 2 commits July 14, 2026 09:55
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@treeform
treeform merged commit 67ffca6 into master Jul 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant