Repository navigation
Anole 0.1.2
Anole 0.1.2 fixes a performance regression from 0.1.1 and brings the C ABI that the Node and Python bindings will build on.
Upgrade
zig fetch --save git+https://github.com/xuckless/anole#v0.1.2Highlights
- PostgreSQL is fast again. 0.1.1 reset every pooled connection when it went back to the pool, which cost about a fifth of the requests per second on pooled reads (HttpArena's async-db profile: 98.9k req/s). Now a connection is reset only when what it ran may have changed its session, and only with the statements that undo that change. On the same box, async-db is back at 123.5k req/s, the same as with the reset turned off, and the protection stays on by default.
- The server's HTTP client keeps its connections. With many handlers calling one upstream at once, the client's small idle pool closed and redialed connections every round, and the server's memory grew without end. Each executor now has its own pool with sensible limits and an idle timeout.
- The C ABI (
anole.h, ABI 0.5) covers the planned scope: HTTP/1.1, HTTP/2 and HTTP/3 with routing and WebSocket topics (from 0.1.1), and now:- databases (SQLite, PostgreSQL, Redis/Valkey, MongoDB), with coalescing and a TTL result cache;
- a gRPC server whose methods are implemented in the host language;
- WebTransport sessions, streams and datagrams;
- mutual TLS, the client certificate on requests, and certificate reload.
- HTTP/3 interop. Against the QUIC interop runner's 15 client implementations, the server now passes 233 cases (207 in 0.1.0), with fixes in path validation, NAT rebinding, Retry, QUIC v2 and ALPN selection. Three of them are patches to the bundled ngtcp2.
Breaking changes
anole.pg.Options.reset_sessionis now an enum,.autoby default.truebecomes.always(or keep the default) andfalsebecomes.off; in the C ABI's configuration,"reset_session"takes"auto","always"or"off". Use.alwaysif server-side functions change session state, since.autojudges from the SQL text.- HTTP client:
client.poolis nowclient.pool(), the calling executor's pool.
Everything else is listed in CHANGELOG.md.