• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

floatdrop / zoxy / 28700369229

04 Jul 2026 08:21AM UTC coverage: 96.67% (+0.1%) from 96.544%
28700369229

push

github

floatdrop
lb: Maglev consistent hashing — per-cluster tables, one hash + one index (Phase 4 complete)

A cluster lb block ({ "policy": "maglev", "hash": "target" | "header" })
builds a prime-sized 65,537-entry lookup table at config time — the one
place allocation is allowed. The data path hashes the key (target, or
the named header; missing header falls back to P2C) and indexes the
table. Availability is enforced at lookup, not rebuild: an unavailable
home endpoint falls forward through the table deterministically
(bitmask-bounded, each endpoint once), so the fallback is consistent
across workers and time; fail-open routes to the home endpoint,
affinity intact. Retries keep the hash and walk the same table with the
failed endpoint softly excluded.

Verified: balance within ±1% at 5 endpoints; <5% of surviving slots
move on endpoint removal; identical tables across builds; pin/spread
integration test; sim cluster "two" is maglev under every seed; the
zero-alloc gate runs a hashed request. Measured (3 alternating runs,
c=64 R=40k): p50/p99/throughput bands identical to P2C.

Closes Phase 4: drain, hot restart, stats continuity, accept balancing,
consistent-hash LB. Next per roadmap: Phase 5, HTTP/2.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

7025 of 7267 relevant lines covered (96.67%)

0.97 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.41
src/sim.zig


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc