Repository navigation
Anole 0.2.1
0.2.1 is the relay pass: I went through every path where one connection sends to another (WebSocket rooms and relays, the C ABI's sends, WebSocket over HTTP/2, HTTP/3 and WebTransport streams) and made them cheaper in CPU and memory. Nothing in the public API changed; the C ABI is 0.8 (one new call, anole_wt_stream_set_priority).
Measured on my x86 Linux box against 0.2.0, Anole only, rested and interleaved runs (raw results in bench/results/20261023-relay-pass-ab and 20261023-relay-pass-rerun on the bench/suite branch):
- WebSocket video-call relay: about 9% more users at good quality, at less CPU per message.
- WebTransport video-call relay: about 8% more users at about half the memory per user, and audio now keeps playing when video collapses (it used to wait behind a stalled keyframe).
- Room fan-out (1,000 sockets at 1,000 Hz): 2.4x the messages delivered at a quarter of the memory.
- HTTP/3: about 35% less memory under load; req/s +2.9% on epoll.
- Writes now return once the data is buffered instead of waiting for the peer's acknowledgements; back-pressure is reported, not hidden inside a send.
Fixed along the way: a WebSocket over HTTP/2 message sent from another connection's task could wait until the peer sent something; large messages over WebSocket on HTTP/2 were held by flow control.
Known trade-offs, each with an issue: under fan-out past saturation, a handler's own reply waits behind the larger send rounds (#92); WebSocket over HTTP/2 costs about twice the CPU per message of HTTP/1.1, so it goes off by default in 0.3.0 (#91); WebSocket memory per user and HTTP/3 on io_uring are slightly behind 0.2.0 (#93, #94).
Install: zig fetch --save git+https://github.com/xuckless/anole#v0.2.1. Full list in CHANGELOG.md.