Skip to content
This repository was archived by the owner on Sep 11, 2026. It is now read-only.

Convert UDP stress test from echo to one-way - #402

Merged
SeanTAllen merged 1 commit into
mainfrom
sean/udp-stress-one-way
Sep 7, 2026
Merged

SeanTAllen merged 1 commit into
mainfrom
sean/udp-stress-one-way

Conversation

@SeanTAllen

Copy link
Copy Markdown
Member

The echo design overloaded the server's receive buffer at even modest volumes — UDP provides no receiver-side backpressure, so every dropped datagram was a silent false failure. All three CI platforms failed on the first run.

This converts the stress test to one-way (client→server only). Results come back via actor messaging instead of UDP echo.

Engine changes:

  • Server verifies each datagram's payload against a per-client keystream (4-byte header: 1 byte client id, 3 bytes big-endian sequence number). Catches corruption the echo design would have detected.
  • Conservation check (client_sent == server_received) stays at reduced volumes where the receiver's kernel buffer won't overflow — a conservation failure at these volumes is a lori event-delivery bug.
  • Validation rejects --clients > 255 (client id is one byte) and --datagrams > 16777215 (sequence is three bytes).

Volume reduction:

  • RUN_MAX_ROUND_TRIPS 500K → 10K
  • RUN_MAX_BYTES 2GB → 50MB
  • Max clients 32 → 4
  • Datagram buckets ~5x smaller
  • Batch sizes [1,5,10,50,100] → [1,3,5,10,15]

The test budget goes to breadth of configurations rather than raw volume per run.

CI: Once daily → 3x/day (0:00, 8:00, 16:00 UTC).

The echo design overloaded the server's receive buffer at even modest
volumes — UDP provides no receiver-side backpressure, so every dropped
datagram was a silent false failure.  The one-way design sends
client→server only and reports results via actor messaging, which
eliminates the echo path and halves the UDP traffic.

The server now verifies each datagram's payload against a per-client
keystream (4-byte header: 1 byte client id + 3 bytes sequence number),
catching corruption the echo design would have detected.  The
conservation check (client_sent == server_received) stays, at volumes
low enough that the receiver's kernel buffer never overflows — a
conservation failure at these volumes is a lori event-delivery bug.

Volume limits are sharply reduced (RUN_MAX_ROUND_TRIPS 500K→10K,
RUN_MAX_BYTES 2GB→50MB, clients max 32→4, datagram buckets ~5x
smaller) so the test budget goes to breadth of configurations rather
than raw volume per run.

CI schedule moves from once daily to 3x/day.
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Sep 7, 2026
@SeanTAllen
SeanTAllen merged commit 07d39fd into main Sep 7, 2026
12 checks passed
@SeanTAllen
SeanTAllen deleted the sean/udp-stress-one-way branch September 7, 2026 19:59
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Sep 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants