atproto utils for zig zat.dev
atproto sdk zig

ArchiveBackfill: opt-in concurrent block fetch with ordered delivery master

Options.concurrency (default 1, clamped to 16) keeps N block fetches in flight through a FIFO window: starts are out-of-order I/O, delivery always awaits the oldest, so handler order equals plan order at any setting. each slot owns one transport/connection, reused as the window slides; whole- segment fetches flush the window first and stay serial. motivation measured 2026-08-08: serial block fetch is round-trip-bound (0.2 MB/s at ~900ms RTT residential->hel1; 8 in flight was 7.2x). smoke now runs serial and concurrency=6 over the same 15 blocks on a threaded Io and asserts identical delivery (9.1s vs 5.9s on this small sample). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>


+154 -12
2 changed files