Repository navigation
Releases: EeroEternal/xlb
Releases · EeroEternal/xlb
Release list
v0.0.9
What's Changed
- feat: add non-idempotent retry boundary, retry timeout ceiling, and redacted trace correlation by @EeroEternal in #10
Full Changelog: v0.0.8...v0.0.9
v0.0.8
What's Changed in v0.0.8
Changed
- Coalesced Thin-L7 protocol probe & keep-alive buffer reuse (
src/proxy/l7.rs,src/proxy/http1.rs): Replaced the 1-byte protocol classification read ([0u8; 1]) with a single8192-byte read intoclient_bufso typical HTTP/1.1 request heads and JSON bodies are ingested in onereadsyscall and one timer registration instead of two; hoistedresponse_bufoutside the keep-alive request loop (ConnBuffer::clear) and made\r\n\r\nheader-end scanning incremental across multi-packet reads.
Full Changelog: v0.0.7...v0.0.8
v0.0.7
What's Changed in v0.0.7
Added
- Pre-first-byte HTTP status rerouting (
thin-l7): When a backend returns a status inretry.retry_statuses(default[402, 404, 429, 500, 502, 503, 504]) before any response byte is written to the client and another healthy backend is available within the retry budget,thin-l7drains the error body, returns keep-alive sockets to the backend's idle pool, incrementsxlb_reroutes_total{backend, status}, and replays the request (up toretry.max_body_bytes, default64 MiBfor long-context prompts) onto the next healthy backend. - Core feature scenarios & architecture SVG diagrams (
README.md,docs/assets/scenarios.svg,docs/assets/architecture.svg): Added a 6-card visual scenario overview and updated architecture diagram.
Changed
- Default
server.mode = "thin-l7"andretry.max_retries = -1:server.modenow defaults to"thin-l7"andretry.max_retriesdefaults to-1(expanding tobackends.servers.len() - 1so every healthy backend can be tried once; set0to disable retries).
Full Changelog: v0.0.6...v0.0.7
v0.0.2
Added
- Passive dial-failure ejection (
backends.passive_unhealthy_threshold&backends.eject_cooldown):
optional data-plane circuit breaking (default0= disabled) that marks a
backend unhealthy after N consecutive TCP dial failures without waiting for
the next active/healthtick, purges its idle connection pool, and
automatically re-admits it aftereject_cooldown(default5s) unless
active health probes have marked it unhealthy (src/backend.rs,
src/config.rs). Breaking: No. - Stale pooled connection redial (
thin-l7): when a pooled keep-alive
connection (reused = true) races with a backend keep-alive close (failing on
request write or returning an immediate 0-byte EOF/RST before any response
byte),thin-l7transparently dials a fresh connection once on the same lease
instead of surfacing a broken stream to the client (src/proxy/l7.rs).
Breaking: No. - Per-backend concurrency cap (
pool.max_conns_per_backend&pool.acquire_timeout):
optional per-backend in-flight connection limit (default0= unlimited) with
bounded queue wait (pool.acquire_timeout, defaulting totimeouts.connect)
and capacity-aware scheduling spillover across healthy backends. When slot
acquisition times out, xFlux increments
xflux_rejected_total{reason="queue_full"}and returns503 Service Unavailable
inthin-l7mode (src/backend.rs,src/proxy/l4.rs,src/proxy/l7.rs).
Breaking: No. - Phased stream timeouts (
timeouts.first_bytevstimeouts.idle): optional
timeouts.first_bytedecouples the pre-response TTFB budget from the in-stream
chunk silence timeout (timeouts.idle, which remains the fallback when
first_byteis omitted). Inthin-l7, a timeout before any response byte is
written to the client returns504 Gateway Timeoutand increments
xflux_rejected_total{reason="timeout"}(src/config.rs,src/proxy/l4.rs,
src/proxy/l7.rs). Breaking: No. - Local pre-push CI hook & console-kit skills: added
.githooks/pre-push
andscripts/install-hooks.shto runscripts/local-gates.shautomatically
beforegit push, plus path-filtered CI in.github/workflows/ci.ymland
git-stash-safe,promote-lesson, andci-concurrency-optimizationskills
under.agents/skills/. Breaking: No.
Changed
- LIFO idle connection pooling:
ConnPoolnow checks out the most recently
returned connection first (pop_back) to maximize socket warmth and reduce
peer keep-alive close races, while evicting expired/oldest connections from
the front (pop_front) (src/pool.rs). Breaking: No. - Renamed project to xFlux (
xflux): crate, binary (xflux), server type
(XFluxServer), health probeUser-Agent(xflux-health), JSON log env var
(XFLUX_LOG_JSON), default log filter (xflux=info), and all Prometheus
metric names (xflux_*) are unified under thexfluxnamespace.
Breaking: Yes (binary name,XFLUX_LOG_JSONenv var, andxflux_*Prometheus
metric prefix replaceflux/FLUX_LOG_JSON/flux_*). - Documented HAProxy-like LB boundary: xFlux inspects HTTP/TCP framing only
and never payload semantics (SSE, JSON, tokens). Metric help strings now state
TTFB rather than token-aware TTFT (AGENTS.md,docs/). Breaking: No.
Fixed
- First-byte histograms are recorded only on the first response head, not again
after a 1xx informational response (src/proxy/l7.rs). Breaking: No. - Connect retries redispatch to a different healthy backend when one is
available, instead of leastconn repeatedly picking the same refused server
(src/backend.rs,src/proxy/l4.rs). Breaking: No. 504 Gateway Timeouterror responses inthin-l7use a fresh write deadline
so the status line is still delivered whenfirst_bytereachestotal
(src/proxy/l7.rs). Breaking: No.
v0.0.1
Added
- L4 forwarding (
mode = "l4", default): pure TCP splice built on
copy_bidirectionalwith an activity watchdog. Zero HTTP parsing, zero body
buffering, half-close aware. One client connection maps to one backend
connection. Applies to any protocol (HTTP/1.1, HTTP/2, WebSocket, gRPC, TLS). - Thin-L7 forwarding (
mode = "thin-l7"): parses only the request/response
heads withhttparseand streams bodies verbatim. Because response
boundaries are known, completed responses return their backend connection to
the idle pool, enabling request-level connection reuse for POST as well. - Automatic L4 fallback (thin-l7): TLS/binary first bytes, the HTTP/2
preface,Upgrade/CONNECTrequests and unparseable heads switch the
connection to the raw splice, forwarding already-buffered bytes first. The
client observes no protocol change. - Backend connection pool (
src/pool.rs): per-backend idle pool, idle
timeout decoupled from stream duration, non-blocking liveness probing on both
acquire and release. Applies to all HTTP methods. - Layered timeouts:
connect, per-directionidle, whole-streamtotal,
and half-closefin, each independently configurable. - Weighted least-connections scheduler plus round-robin, with health-aware
filtering and an RAII in-flightLease. - Active health checking on a lightweight path with unhealthy/healthy
hysteresis; never touches in-flight streams. - Optional client-facing TLS termination via rustls (ring provider), PEM
cert/key,http/1.1ALPN. Orthogonal to the forwarding mode. - Prometheus metrics:
flux_ttft_delta_ms,flux_upstream_ttft_ms,
flux_client_ttft_ms,flux_stream_duration_seconds,
flux_active_streams,flux_conn_reuse_total,flux_conn_new_total,
flux_conn_dial_errors_total,flux_rejected_total,
flux_health_check_failures,flux_health_check_success_total,
flux_backend_healthy,flux_upstream_errors_total,flux_bytes_total,
flux_connections_total,flux_active_connections. Served onGET /metrics. - Operations: single binary, TOML config,
--checkvalidation, graceful
shutdown on SIGINT/SIGTERM,SO_REUSEPORT. - Agent governance:
AGENTS.md,docs/ai/agents/, and
.agents/skills/imported from console-kit conventions, plus a CI workflow
mirroring the local gates.