Repository navigation
Conversation
sh1pt-actions-fleet
Bot
force-pushed
the
feat/hosting-striped-media
branch
from
November 9, 2026 12:44
ffb7f37 to
80dd655
Compare
This was referenced Nov 9, 2026
sh1pt-actions-fleet
Bot
force-pushed
the
feat/hosting-striped-media
branch
from
November 9, 2026 12:48
80dd655 to
0e9081c
Compare
ThreatCrush Security Scan13 finding(s) HIGH/CRITICAL: 1 | MEDIUM: 8 | LOW: 4
Snippets are redacted; ThreatCrush never prints matched credential material. |
sh1pt-actions-fleet Bot
pushed a commit
that referenced
this pull request
Nov 9, 2026
…k budget size_caps_split_free_and_paid: 300 GiB is now a valid paid site; the 'Split' error moves to MAX_SITE_BYTES + 1 GiB. opendisk descriptor tests asserted the old fixed 5 GiB budget while Config::default() now means the automatic budget of the real disk (#222), so they failed on CI runners; pin max_bytes = 5 GiB in both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Heads-up from a parallel session: this branch's |
ralyodio
added a commit
that referenced
this pull request
Nov 9, 2026
feat(hosting): 4 TiB site cap (stacked on #222)
…fast multi-source replication - Sites over 1 GiB are striped: chunks bucketed by hash into one group per 64 MiB, each group placed on 3 nodes by rendezvous hashing on (site, group). Healing, copy counting, GC, challenges, budgets and the free-disk floor all work per group; gossip carries a group bitmap and each node's room. - Caps: 256 GiB paid / 64 GiB free per site, 128 GiB per file; small sites other features publish keep 1 GiB. Parted manifests also split by chunk count so every part stays one chunk fetch. - Node budget follows the disk by default (held + 25% of free above the floor); per-owner limit (16 GiB) applies to free copies only. Placement skips nodes that announced too little room, whole sites too. - Gateways answer Range requests (206/416, If-Range, 304) on /s/<id>/ and custom domains, fetching only the chunks a range covers, streaming large files with read-ahead; video content types (mkv, m4v, mov, ...). - Fetching: many chunks in flight, each from the holder with the lowest expected wait, AIMD per-peer limits, hedged slow requests, failover, DHT last. Chunk fetch protocol 2.0.0 sends byte strings (v1 sent integer arrays, ~1.9x the bytes); v1 kept for older peers. Chunk reads no longer block the swarm loop. - Hosting nodes and publishers dial hosting peers that announced a public address, so peers behind NAT can be fetched from. - publish scans in place (no copy; served from the files), caches hashes, resumes on re-run, shows hashing/replication progress, and says which limit was hit. --disks auto asks for disks with room for their share. - New: c0mpute hosting get (download with MB/s, --sequential to compare), c0mpute hosting rm (publish an empty version). Tests: stripe placement determinism and refill, room/widening, Range parsing and slicing, chunk-bounded parts, scanner and cache, AIMD limits, and hosting_striped_e2e: a 260 MiB site striped over 5 nodes, ranges via a gateway, refill after a holder leaves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…get test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g, fast replication) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sh1pt-actions-fleet
Bot
force-pushed
the
feat/hosting-striped-media
branch
from
November 9, 2026 13:21
7a8f9bc to
5159391
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
c0mpute hosting publish ./movies --name movies --disks autofailed withError: site is over 256 MiB(1 GiB since v0.3.0). This makes folders of movies publish, replicate across the network without any node holding the whole site, and stream with seeking from any gateway.Striped placement (sites over 1 GiB)
(site, group)(rendezvous hashing, same answer on every node). No node needs the whole site.Held.groups(a bitmap) andHolding.room(bytes a node can still take). Only nodes that announceroomare counted on for a group, so older nodes are never relied on.hosting lsand/hosting/v1/sites:copies= the fewest copies of any group, plusgroups,short_groups,missing_groups.Limits
--disks)[hosting] max_bytes = 0(default): what it holds + 25% of free space above the floor; a fixed value still winsThe d1sks descriptor advertises the same budget, and
--disks autoasks for disks with room for their share. Parted manifests (#211) now also close a part at 65,536 chunks, so a 256 GiB site's chunk lists are fetched a part at a time. Placement skips nodes that announced too little room for a copy, whole sites too (before, a full node ranked first left the site short forever).Streaming
Gateways answer
Rangeon/s/<id>/...and custom domains: 206 withContent-Range, 416 past the end,Accept-Ranges: bytes,If-Range,If-None-Match(304). Only the chunks a range covers are fetched; large bodies stream with 8 chunks of read-ahead instead of being loaded whole. Addedmkv,m4v,mov,ogv,m3u8,srttypes; media caches for an hour, HTML for a minute.Faster replication
/c0mpute/chunk-fetch/2.0.0sends chunks as CBOR byte strings (v1 sent integer arrays, about 1.9x the bytes); v1 is kept for older peers (fallback onUnsupportedProtocols). Chunk reads moved off the swarm event loop.Measured: dev2 -> bonita (home, behind NAT), 200 MiB file, one source
c0mpute hosting get <site> big.bin --from <holder>on bonita, the holder a publisher on dev2 (reached through an ssh tunnel, since dev2's random p2p ports are firewalled):7.6x on one source; with several holders a copy pulls from all of them at once. Over loopback the e2e test places 3 copies of 260 MiB in 2.6 s and a gateway streams the whole file in 0.7 s.
Finding, not fixed here: most nodes cannot dial each other at all. dev2 and dev3 drop inbound on random p2p ports and home nodes are behind NAT, and c0mpute has no relay, so cross-network copies only happen where one side has a reachable fixed port. Before this PR a 200 MB site published from bonita got 0 copies and the gateway answered 502 (
Failed to dial the requested peer). The dial-out in this PR helps whenever one side is reachable; a fixed open p2p port on the gateway (or a relay) is still needed.Publish UX
hosting::seed), so 50 GiB of video does not need 50 GiB more disk. Hashes are cached per file (size + mtime), so a re-run is quick.--wait-secsis a no-progress timeout.--disks auto; over 256 GiB or a file over 128 GiB: split).c0mpute hosting get <site> <path>(download with MB/s,--sequentialto compare,--fromto pin sources) andc0mpute hosting rm --name <site>(publishes an empty version; holders drop the files).Tests
hosting_striped_e2e: a 260 MiB site (threshold lowered for the test) striped over 5 local nodes, every group at 3 copies with no node holding all, a gateway serving ranges across chunk boundaries plus 416/304/If-Range, and refill after a holder leaves.hosting_e2e,hosting_parts_e2e,podcast_e2e,ads_e2e,ads_billing_e2epass locally (test nodes now pin a pretend disk above the free-disk floor, so they run on full boxes too).🤖 Generated with Claude Code